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: catálogo ControlDesk (a24c.*) + usuarios del panel - DB_POSTGRES_HOST=postgres - 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 volumes: # Map the actual backup folder from host to the container's backup path # Windows path D:/BackupSFTP/ mapped to /data/backups inside container (read-only) - D:/BackupSFTP:/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: - "5432: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