feat(deploy): Implement custom postgres build to fix init script

This commit is contained in:
Marco Gallegos
2025-07-05 12:48:33 -06:00
committed by GitHub
parent 2bff898590
commit 9c69ca25b5

View File

@@ -29,14 +29,12 @@ services:
condition: service_healthy condition: service_healthy
pg_database: pg_database:
# ¡CAMBIO CLAVE! En lugar de 'image', usamos 'build'.
build: build:
context: . context: .
dockerfile: Dockerfile.postgres dockerfile: Dockerfile.postgres
container_name: shared_postgres_db container_name: shared_postgres_db
restart: always restart: always
volumes: volumes:
# El montaje del script ya no es necesario aquí
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]