ca-grow-ops-manager/docker-compose.yml
fullsizemalt cfb3caabe7
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
fix(docker): Fix malformed docker-compose.yml
- Resolved duplicate 'frontend' service definition
- Resolved duplicate 'labels' key in go2rtc/frontend block
- Ensured valid YAML structure
2025-12-11 12:58:31 -08:00

101 lines
2.6 KiB
YAML

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", "wget", "-q", "-O-", "http://127.0.0.1:3000/api/healthz" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
go2rtc:
image: alexxit/go2rtc:latest
restart: unless-stopped
networks:
- internal
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.wolfpack-go2rtc.rule=Host(`777wolfpack.runfoo.run`) && PathPrefix(`/monitor`)"
- "traefik.http.routers.wolfpack-go2rtc.entrypoints=websecure"
- "traefik.http.routers.wolfpack-go2rtc.tls.certresolver=letsencrypt"
- "traefik.http.services.wolfpack-go2rtc.loadbalancer.server.port=1984"
volumes:
- ./go2rtc.yaml:/config/go2rtc.yaml
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(`777wolfpack.runfoo.run`)"
- "traefik.http.routers.wolfpack-frontend.entrypoints=websecure"
- "traefik.http.routers.wolfpack-frontend.tls.certresolver=letsencrypt"
- "traefik.http.services.wolfpack-frontend.loadbalancer.server.port=80"
depends_on:
- backend
restart: unless-stopped
networks:
- internal
- traefik-public
networks:
internal:
traefik-public:
external: true
volumes:
db_data: