version: '3.8' services: db: image: postgres:15-alpine environment: POSTGRES_DB: ca_grow_ops POSTGRES_USER: ca_grow_ops POSTGRES_PASSWORD: ${DB_PASSWORD} volumes: - db_data:/var/lib/postgresql/data restart: unless-stopped networks: - internal healthcheck: test: [ "CMD-SHELL", "pg_isready -U ca_grow_ops" ] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine restart: unless-stopped networks: - internal healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 10s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile environment: DATABASE_URL: postgresql://ca_grow_ops:${DB_PASSWORD}@db:5432/ca_grow_ops REDIS_URL: redis://redis:6379 JWT_SECRET: ${JWT_SECRET} JWT_ACCESS_EXPIRY: 15m JWT_REFRESH_EXPIRY: 7d NODE_ENV: production PORT: 3000 depends_on: db: condition: service_healthy redis: condition: service_healthy restart: unless-stopped networks: - internal healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:3000/healthz" ] interval: 30s timeout: 10s retries: 3 start_period: 40s frontend: build: context: ./frontend dockerfile: Dockerfile environment: VITE_API_URL: /api labels: - "traefik.enable=true" - "traefik.docker.network=traefik-public" - "traefik.http.routers.wolfpack-frontend.rule=Host(`growops.runfoo.run`)" - "traefik.http.routers.wolfpack-frontend.entrypoints=websecure" - "traefik.http.routers.wolfpack-frontend.tls.certresolver=letsencrypt" - "traefik.http.routers.wolfpack-frontend.priority=10000" - "traefik.http.services.wolfpack-frontend.loadbalancer.server.port=80" ports: - "3001:80" depends_on: - backend restart: unless-stopped networks: - internal - traefik-public networks: internal: traefik-public: external: true volumes: db_data: