Files
sf-monitorizacion-health/deployment/local/docker/docker-compose.yaml

58 lines
1.3 KiB
YAML
Raw Normal View History

2026-05-04 16:29:27 +02:00
name: sf-monitorizacion-health
networks:
default:
driver: bridge
name: network-test # Tiene que coincidir con el compose objetivo
services:
sf-monitorizacion-health:
container_name: sf-monitorizacion-health
image: sf-monitorizacion-health
build:
context: ./
dockerfile: deployment/local/docker/Dockerfile.local
args:
PORT: "${PORT:-3000}"
develop:
watch:
- path: ./src
action: sync
target: /usr/local/app/packages
- path: ./package.json
action: rebuild
ports:
- ${PORT}:${PORT}
env_file:
- .env
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"wget -q --spider http://127.0.0.1:${PORT:-3000}/health || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
depends_on:
postgresql-health:
condition: service_healthy
postgresql-health:
container_name: postgresql-health
image: postgres:16.1
env_file:
- .env
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- ./sql-data/:/var/lib/postgres/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
retries: 5
start_period: 5s
timeout: 5s
command: -p 5432