Update docker-compose.yaml

This commit is contained in:
Marco Gallegos
2025-07-04 19:36:29 -06:00
committed by GitHub
parent 887f4abf21
commit a7832b1142

View File

@@ -1,6 +1,7 @@
# Archivo: docker-compose.yml # Archivo: docker-compose.yml
# Version: 1.4 - Final Fix # Version: 1.5 - Truly Clean
# Descripción: Corregido para asegurar que init-db.sh se monte como un archivo. # Descripción: Versión final sin NINGUNA variable de entorno hardcodeada,
# dando control total a la interfaz de Coolify.
version: '3.8' version: '3.8'
@@ -37,12 +38,10 @@ services:
image: postgres:16-alpine image: postgres:16-alpine
container_name: shared_postgres_db container_name: shared_postgres_db
restart: always restart: always
environment: # LA SECCIÓN 'environment' HA SIDO ELIMINADA DE AQUÍ.
- POSTGRES_USER=${POSTGRES_USER} # Coolify pasará las variables POSTGRES_* desde la UI.
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${N8N_DB_NAME}
volumes: volumes:
# ESTA ES LA LÍNEA CRÍTICA: Asegura que el archivo se monte, no un directorio. - postgres_data:/var/lib/postgresql/data
- ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh - ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]