services: postgres: image: postgres:15-alpine restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-clipforge} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme_clipforge_2025} POSTGRES_DB: ${POSTGRES_DB:-clipforge} volumes: - postgres_data:/var/lib/postgresql/data - ./database/init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-clipforge}"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine restart: unless-stopped command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile restart: unless-stopped env_file: .env environment: - DATABASE_URL=${DATABASE_URL:-postgresql+asyncpg://clipforge:changeme_clipforge_2025@postgres:5432/clipforge} - REDIS_URL=${REDIS_URL:-redis://redis:6379/0} volumes: - media_data:/data depends_on: postgres: condition: service_healthy redis: condition: service_healthy labels: - "traefik.enable=true" - "traefik.http.routers.clipforge.rule=Host(`clip.jeffemmett.com`)" - "traefik.http.services.clipforge.loadbalancer.server.port=8000" networks: - default - traefik-public wireguard: image: lscr.io/linuxserver/wireguard:latest container_name: clipforge-wg cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=Europe/Berlin volumes: - ./wg-client:/config sysctls: - net.ipv4.conf.all.src_valid_mark=1 extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped worker: build: context: ./backend dockerfile: Dockerfile restart: unless-stopped command: ["arq", "app.worker.WorkerSettings"] network_mode: "service:wireguard" env_file: .env environment: - DATABASE_URL=${DATABASE_URL:-postgresql+asyncpg://clipforge:changeme_clipforge_2025@postgres:5432/clipforge} - REDIS_URL=${REDIS_URL:-redis://redis:6379/0} - YTDLP_COOKIES_FILE=/app/cookies.txt volumes: - media_data:/data - ./cookies.txt:/app/cookies.txt depends_on: wireguard: condition: service_started postgres: condition: service_healthy redis: condition: service_healthy frontend: build: context: ./frontend dockerfile: Dockerfile restart: unless-stopped labels: - "traefik.enable=false" networks: - default volumes: postgres_data: redis_data: media_data: networks: traefik-public: external: true