zee-solution/docker-compose.yml
ulflow_phattt2901 f8957e0d95
Some checks failed
CI Pipeline / Security Scan (push) Successful in 5m1s
CI Pipeline / Lint (push) Failing after 6m9s
CI Pipeline / Test (push) Has been skipped
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Notification (push) Successful in 1s
chore:update docker
2025-06-06 19:11:07 +07:00

45 lines
1.1 KiB
YAML

# docker-compose.prod.yml (Cho Production / CI/CD)
version: '3.8'
services:
api:
build:
context: .
dockerfile: Dockerfile # Sử dụng Dockerfile production
container_name: ulflow-api-prod
ports:
- "3000:3000"
# KHÔNG CÓ VOLUMES: - .:/app ở đây!
command: /app/app # Chạy binary đã build
# KHÔNG CÓ ENV_FILE Ở ĐÂY, BIẾN MÔI TRƯỜNG SẼ ĐƯỢC CUNG CẤP TỪ BÊN NGOÀI
restart: always
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
depends_on:
- postgres
networks:
- ulflow-network
postgres:
image: postgres:15-alpine
container_name: ulflow-postgres-prod
restart: unless-stopped
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
ports:
- "5433:5432"
volumes:
- postgres-prod-data:/var/lib/postgresql/data # Volume riêng cho prod DB
networks:
- ulflow-network
volumes:
postgres-prod-data:
networks:
ulflow-network:
driver: bridge