Some checks failed
Aduanasoft/PANEL_BASES_ANEXO24/pipeline/head There was a failure building this commit
- Added new environment variables for deduplication and SQL Server password encryption. - Updated docker-compose files to include SECRET_KEY and ENCRYPTION_KEY for compatibility with a24c. - Enhanced the navigation structure to reflect changes in admin-only views and report access. - Introduced new functions for handling SQL Server connections and database management, including parsing server addresses and listing user databases. This update improves security and functionality related to database management and user access control. Reviewed-on: #15 Co-authored-by: AlexeerCT <acazares@aduanasoft.com.mx> Co-committed-by: AlexeerCT <acazares@aduanasoft.com.mx>
84 lines
2.6 KiB
YAML
84 lines
2.6 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}
|
|
# Clave Fernet compartida con a24c (debe coincidir con la SECRET_KEY de a24c)
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- 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
|