Simplify deployment: nginx only with proxy to port 5137

- Remove unnecessary services (api-base, test_api, frontend containers)
- Configure nginx to proxy to host.docker.internal:5137
- Simplified docker-compose.yml for initial deployment test

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
happybell80 2025-07-07 23:46:18 +09:00
parent cb2de53935
commit f95115b275
2 changed files with 3 additions and 99 deletions

View File

@ -2,108 +2,12 @@ version: '3.8'
services:
nginx:
image: your-username/robeing-nginx:latest
build: ./nginx
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:
retries: 3

View File

@ -45,7 +45,7 @@ http {
}
upstream frontend_backend {
server frontend:5173;
server host.docker.internal:5137;
}
# Main server block