# Local-dev stack for telegram-gateway. Brings up Redis (Phase 1.5 auth) and # Postgres (Phase 2b queue) so you can run the gateway locally with the same # env-var contract as in cluster. # # Usage : # # docker compose up -d # export REDIS_URL=redis://localhost:6379/0 # export DATABASE_URL=postgres://gateway:gateway@localhost:5432/gateway?sslmode=disable # export AUTH_SECRET=$(openssl rand -hex 16) # export ALLOWED_USERS= # export BOT_FACTORY_TOKEN= # export BOT_FACTORY_SECRET=$(openssl rand -hex 32) # make run # # Tests don't need this — they use miniredis in-process and (eventually) # testcontainers-go for Postgres. services: redis: image: redis:8-alpine container_name: tg-gateway-redis ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 postgres: image: postgres:16-alpine container_name: tg-gateway-postgres environment: POSTGRES_USER: gateway POSTGRES_PASSWORD: gateway POSTGRES_DB: gateway ports: - "5432:5432" volumes: - tg-gateway-pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U gateway -d gateway"] interval: 5s timeout: 3s retries: 5 volumes: tg-gateway-pgdata: