version: "3.8" services: postgres: image: postgres:16-alpine container_name: weiwuweixin-postgres restart: unless-stopped ports: - "5432:5432" environment: POSTGRES_USER: ${POSTGRES_USER:-weiwuweixin} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme} POSTGRES_DB: ${POSTGRES_DB:-weiwuweixin} volumes: - pg-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U weiwuweixin"] interval: 10s timeout: 5s retries: 5 api: build: context: . dockerfile: apps/api/Dockerfile container_name: weiwuweixin-api restart: unless-stopped ports: - "3001:3001" environment: DATABASE_URL: postgresql://${POSTGRES_USER:-weiwuweixin}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-weiwuweixin} JWT_SECRET: ${JWT_SECRET} LOG_LEVEL: ${LOG_LEVEL:-info} LOG_FILE: ${LOG_FILE:-/app/logs/api.log} volumes: - api-logs:/app/logs depends_on: postgres: condition: service_healthy web: build: context: . dockerfile: apps/web/Dockerfile container_name: weiwuweixin-web restart: unless-stopped ports: - "3002:3002" environment: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://api:3001} depends_on: - api minio: image: minio/minio:latest container_name: weiwuweixin-minio restart: unless-stopped ports: - "9000:9000" - "9001:9001" environment: MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin} MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-changeme} volumes: - minio-data:/data command: server /data --console-address ":9001" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 10s timeout: 5s retries: 5 volumes: pg-data: minio-data: api-logs: