Files

49 lines
1.2 KiB
YAML

services:
web:
build: .
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_ENV: production
PORT: "3000"
POSTGRES_HOST: db
POSTGRES_PORT: "5432"
POSTGRES_DB: ${POSTGRES_DB:-encuesta_e3}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres_local_password}
ADMIN_SECRET: ${ADMIN_SECRET:-RESETEOE3}
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 20s
timeout: 5s
retries: 3
start_period: 15s
depends_on:
- db
networks:
- default
db:
image: postgres:16-alpine
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB:-encuesta_e3}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres_local_password}
volumes:
- encuesta-db-data-local:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d encuesta_e3"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- default
volumes:
encuesta-db-data-local: {}