services: web: image: ${WEB_IMAGE:-xiaoxia-saas-web:dev} build: context: ../.. dockerfile: infra/docker/web.Dockerfile environment: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000} ports: - "${WEB_PORT:-3000}:3000" depends_on: - api api: image: ${API_IMAGE:-xiaoxia-saas-api:dev} build: context: ../.. dockerfile: infra/docker/api.Dockerfile env_file: - ../../.env environment: APP_ENV: ${APP_ENV:-development} ports: - "${API_PORT:-8000}:8000" depends_on: - postgres - redis worker: image: ${WORKER_IMAGE:-xiaoxia-saas-worker:dev} build: context: ../.. dockerfile: infra/docker/worker.Dockerfile env_file: - ../../.env environment: APP_ENV: ${APP_ENV:-development} depends_on: - redis - postgres postgres: image: postgres:16 environment: POSTGRES_DB: ${POSTGRES_DB:-xiaoxia_saas} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} ports: - "${POSTGRES_PORT:-5432}:5432" volumes: - postgres_data:/var/lib/postgresql/data redis: image: redis:7 ports: - "${REDIS_PORT:-6379}:6379" volumes: postgres_data: