fix: Update postgres service configuration in compose.yml for clarity and correctness

This commit is contained in:
2026-03-07 09:28:48 +07:00
parent b413d78cd5
commit 2677e40f42

View File

@@ -1,8 +1,7 @@
services: services:
postgres: postgres:
build: # run `just build postgres` first
context: . build: database-postgres:latest
dockerfile: Dockerfile
restart: unless-stopped restart: unless-stopped
environment: environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres}
@@ -11,7 +10,7 @@ services:
ports: ports:
- "${POSTGRES_PORT:-5432}:5432" - "${POSTGRES_PORT:-5432}:5432"
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s interval: 10s