From 91456d118a2c1e4342a1051ffc95a138078c9f63 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 6 Feb 2026 12:49:36 -0500 Subject: [PATCH] fix: restore essential database configuration for self-hosted deployment Restore 4 critical lines removed in commit 6ebe974: 1. postgres_data:/var/lib/postgresql/data - Persist database across container recreations 2. ./database/schema:/docker-entrypoint-initdb.d - Auto-load schema on first startup 3. ports: - "5432:5432" - Expose DB to host for integration tests and direct access 4. env_file: - .env - Load environment configuration These are required for: - Self-hosted production deployments - Data persistence across docker-compose up -d --build - Automatic database initialization on new machines - Integration test execution (localhost:5432 access) Fixes integration tests that fail with "connection refused" --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index aa8d465..9274575 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,12 +10,18 @@ services: POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DBPASS} volumes: + - postgres_data:/var/lib/postgresql/data + - ./database/schema:/docker-entrypoint-initdb.d - ./uploads:/app/uploads + ports: + - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 3 + env_file: + - .env # Bookhoard Application app: @@ -61,4 +67,5 @@ services: # Named Volumes volumes: + postgres_data: bookhoard_conversion_cache: \ No newline at end of file