feat: split postgres.Dockerfile in two stages to not include build pkgs into the final image. It also adds the postgres user at the end

This commit is contained in:
adrian
2025-09-03 09:56:14 +02:00
committed by Tamara
parent 10fceb1607
commit 8f1b2d9df8
2 changed files with 17 additions and 13 deletions

View File

@@ -1,4 +1,3 @@
version: "3.1"
services:
db:
build:
@@ -7,13 +6,12 @@ services:
restart: "always"
environment:
POSTGRES_PASSWORD: mypassword
POSTGRES_DATABASE: tycho_indexer_0
POSTGRES_USERNAME: postgres
POSTGRESQL_SHARED_PRELOAD_LIBRARIES: pg_cron
POSTGRES_USER: postgres
POSTGRES_DB: tycho_indexer_0
ports:
- "5431:5432"
shm_size: "1gb"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
postgres_data: