58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
services:
|
|
backend:
|
|
image: itam-backend:prod
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backend.prod
|
|
container_name: itam-backend
|
|
working_dir: /app
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3000
|
|
volumes:
|
|
- ./uploads:/app/uploads
|
|
- ./map_config.json:/app/map_config.json:ro
|
|
expose:
|
|
- "3000"
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
frontend:
|
|
image: itam-frontend:prod
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.frontend.prod
|
|
container_name: itam-frontend
|
|
expose:
|
|
- "80"
|
|
restart: unless-stopped
|
|
|
|
nginx:
|
|
image: nginx:stable-alpine
|
|
container_name: itam-nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./logs/nginx:/var/log/nginx
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
frontend:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|
|
|