services: db: image: postgres:15-alpine restart: unless-stopped environment: POSTGRES_DB: subscriptions POSTGRES_USER: bot POSTGRES_PASSWORD: botpass volumes: - pgdata:/var/lib/postgresql/data subscription-bot: image: ghcr.io/case211/subscription-tgbot:latest env_file: .env depends_on: - db restart: unless-stopped environment: DATABASE_URL: ${DATABASE_URL:-postgresql://bot:botpass@db:5432/subscriptions} networks: - web expose: - "8080" caddy: image: caddy:2-alpine restart: unless-stopped volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config ports: - "80:80" - "443:443" depends_on: - subscription-bot networks: - web volumes: pgdata: caddy_data: caddy_config: networks: web: driver: bridge