services: postgres: image: postgres:15-alpine container_name: lucky_wheel_postgres restart: unless-stopped environment: POSTGRES_DB: lucky_wheel POSTGRES_USER: postgres POSTGRES_PASSWORD: postgrespassword ports: - "5432:5432" volumes: - pg_data:/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres -d lucky_wheel" ] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: lucky_wheel_redis restart: unless-stopped ports: - "6380:6379" volumes: - redis_data:/data healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 5s timeout: 5s retries: 5 api: build: context: . dockerfile: apps/api/Dockerfile container_name: lucky_wheel_api restart: unless-stopped ports: - "3001:3000" environment: - DATABASE_URL=postgresql://postgres:postgrespassword@postgres:5432/lucky_wheel?schema=public - REDIS_HOST=redis - REDIS_PORT=6379 - NODE_ENV=production depends_on: postgres: condition: service_healthy redis: condition: service_healthy admin: build: context: . dockerfile: apps/admin/Dockerfile args: VITE_CLIENT_PUBLIC_URL: ${VITE_CLIENT_PUBLIC_URL:-} container_name: lucky_wheel_admin restart: unless-stopped ports: - "5173:80" - "8080:80" depends_on: - api client: build: context: . dockerfile: apps/client/Dockerfile container_name: lucky_wheel_client restart: unless-stopped ports: - "5174:80" - "80:80" depends_on: - api volumes: pg_data: redis_data: