Problem
The flanksource/postgres:17 image does not create the database specified in the POSTGRES_DB environment variable during initialization, unlike standard PostgreSQL images (including supabase/postgres).
Expected Behavior
When POSTGRES_DB is set to a value other than "postgres", that database should exist after the container starts for the first time.
Current Behavior
Only the default databases are created:
- postgres
- template0
- template1
The custom database specified in POSTGRES_DB is not created.
Reproduction
# docker-compose.yaml
services:
postgres:
image: ghcr.io/flanksource/postgres:17
environment:
POSTGRES_DB: mission_control
POSTGRES_USER: postgres
POSTGRES_PASSWORD: testpassword
ports:
- "5432:5432"
Running docker-compose up and then checking with psql -U postgres -c "\l" shows that mission_control database does not exist.
Impact
This breaks migration from supabase/postgres to flanksource/postgres when using helm charts that rely on POSTGRES_DB to automatically create the application database.
Problem
The flanksource/postgres:17 image does not create the database specified in the
POSTGRES_DBenvironment variable during initialization, unlike standard PostgreSQL images (including supabase/postgres).Expected Behavior
When
POSTGRES_DBis set to a value other than "postgres", that database should exist after the container starts for the first time.Current Behavior
Only the default databases are created:
The custom database specified in
POSTGRES_DBis not created.Reproduction
Running
docker-compose upand then checking withpsql -U postgres -c "\l"shows thatmission_controldatabase does not exist.Impact
This breaks migration from supabase/postgres to flanksource/postgres when using helm charts that rely on
POSTGRES_DBto automatically create the application database.