nginx-infra/docker-compose.yml
happybell80 56eaf8c9b5 Initial nginx-infra setup with GitOps deployment
- Add GitHub Actions CI/CD pipeline
- Configure Nginx reverse proxy for robeing services
- Setup docker-compose for full stack deployment
- Include health checks for all services
- Support for PostgreSQL and Redis data persistence

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 21:52:52 +09:00

109 lines
2.4 KiB
YAML

version: '3.8'
services:
nginx:
image: your-username/robeing-nginx:latest
ports:
- "80:80"
- "443:443"
depends_on:
- api-base
- test_api
- frontend
networks:
- robeing-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
api-base:
image: your-username/robeing-api-base:latest
ports:
- "8000:8000"
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
networks:
- robeing-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
test_api:
image: your-username/robeing-test-api:latest
ports:
- "8001:8001"
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
networks:
- robeing-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
image: your-username/robeing-frontend:latest
ports:
- "5173:5173"
environment:
- NODE_ENV=production
- VITE_API_URL=http://localhost/api
networks:
- robeing-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5173"]
interval: 30s
timeout: 10s
retries: 3
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=robeing
- POSTGRES_USER=${POSTGRES_USER:-robeing}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- robeing-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-robeing}"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
networks:
- robeing-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
networks:
robeing-network:
driver: bridge
volumes:
postgres_data:
redis_data: