version: '3.8' services: frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: - NEXT_PUBLIC_API_URL=http://backend:8000/api/v1 depends_on: - backend networks: - kol-network backend: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" environment: - DATABASE_URL=${DATABASE_URL} - CORS_ORIGINS=http://localhost:3000,http://frontend:3000 - BRAND_API_BASE_URL=${BRAND_API_BASE_URL:-https://api.internal.intelligrow.cn} depends_on: - db networks: - kol-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s db: image: postgres:14-alpine ports: - "5432:5432" environment: - POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} - POSTGRES_DB=${POSTGRES_DB:-yuntu_kol} volumes: - postgres_data:/var/lib/postgresql/data networks: - kol-network healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 networks: kol-network: driver: bridge volumes: postgres_data: