Skip to content

Instantly share code, notes, and snippets.

View G4brym's full-sized avatar
🇵🇹

Gabriel Massadas G4brym

🇵🇹
View GitHub Profile
@G4brym
G4brym / cache_wrapper.py
Created February 21, 2022 20:04
Simple one size fits all Cache Wrapper compatible with FastApi endpoints
import logging
from inspect import signature
from typing import Callable, Any, Optional
import redis
cache = redis.Redis(host='localhost', port=6379, db=0)
class CacheReady:
@G4brym
G4brym / docker-compose.yml
Created February 1, 2021 19:14
Docker compose for running GlitchTip with persistent PostgreSQL
version: "3.4"
x-environment: &default-environment
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
SECRET_KEY: your-secret-here
PORT: 8000
GLITCHTIP_DOMAIN: https://glitchtip.yourcompany.com
EMAIL_URL: smtp+tls://smtp-user:[email protected]:587
DEFAULT_FROM_EMAIL: [email protected]
ENABLE_OPEN_USER_REGISTRATION: "True"
x-depends_on: &default-depends_on