fase(22): docker production setup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
52
docker-compose.prod.yml
Normal file
52
docker-compose.prod.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "${PORT:-3001}:3001"
|
||||
env_file:
|
||||
- .env.production
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
volumes:
|
||||
- abe-data:/app/data
|
||||
- abe-reports:/app/reports
|
||||
- abe-logs:/app/logs
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3001/health/live"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
start_period: 30s
|
||||
retries: 5
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 1g
|
||||
reservations:
|
||||
memory: 256m
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
abe-data:
|
||||
driver: local
|
||||
abe-reports:
|
||||
driver: local
|
||||
abe-logs:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: abe-network
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user