82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
# Use host.docker.internal to access resources on the host machine
|
|
# SQL Server: credenciales globales (server_name / database_name vienen de a24c.database_nodes en Postgres)
|
|
- PANEL_MSSQL_USER=${PANEL_MSSQL_USER}
|
|
- PANEL_MSSQL_PASSWORD=${PANEL_MSSQL_PASSWORD}
|
|
- PANEL_MSSQL_DOCKER=${PANEL_MSSQL_DOCKER:-true}
|
|
- IN_DOCKER=true
|
|
|
|
# PostgreSQL: apunta a la a24c local (contenedor a24c-postgres publicado en el host :5432)
|
|
- DB_POSTGRES_HOST=host.docker.internal
|
|
- DB_POSTGRES_PORT=5432
|
|
- DB_POSTGRES_USER=${DB_POSTGRES_USER}
|
|
- DB_POSTGRES_PASS=${DB_POSTGRES_PASS}
|
|
- DB_POSTGRES_DB=${DB_POSTGRES_DB}
|
|
|
|
# JWT Secret
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
|
|
# Use a mounted volume for backups
|
|
- BACKUP_PATH=/data/backups
|
|
|
|
- PORT=3000
|
|
- ORIGIN=https://localhost:3000
|
|
- NODE_ENV=production
|
|
|
|
# SMTP para envío de avisos (opcional — vacío deshabilita el envío real sin errores)
|
|
- SMTP_HOST=${SMTP_HOST:-}
|
|
- SMTP_PORT=${SMTP_PORT:-587}
|
|
- SMTP_USER=${SMTP_USER:-}
|
|
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
|
|
- SMTP_FROM=${SMTP_FROM:-}
|
|
- SMTP_USE_TLS=${SMTP_USE_TLS:-true}
|
|
|
|
# Integración CloudRestoreAS
|
|
- CLOUDRESTORE_API_TOKEN=${CLOUDRESTORE_API_TOKEN}
|
|
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
|
volumes:
|
|
# Map the actual backup folder from host to the container's backup path
|
|
# Local dev: carpeta escribible del repo con respaldos sintéticos (read-only en el contenedor)
|
|
- ./local-backups:/data/backups:ro
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- aduanasoft-network
|
|
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: aduanasoft-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${DB_POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${DB_POSTGRES_PASS}
|
|
POSTGRES_DB: ${DB_POSTGRES_DB}
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
ports:
|
|
- "5434:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./database/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- aduanasoft-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
|
|
networks:
|
|
aduanasoft-network:
|
|
driver: bridge
|