39 lines
789 B
YAML
39 lines
789 B
YAML
services:
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
env_file: /opt/loreal-sla-calculator/server/.env
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- sla_net
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3100:3100"
|
|
env_file: /opt/loreal-sla-calculator/server/.env
|
|
environment:
|
|
- PORT=3100
|
|
- NODE_ENV=production
|
|
- SERVE_STATIC=false
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- sla_net
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|
|
networks:
|
|
sla_net:
|