fix: postgres extensions setup in dockerfile

This commit is contained in:
adrian
2025-09-03 10:56:07 +02:00
committed by Tamara
parent 281bab5cac
commit 7b028f4263
2 changed files with 1 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ services:
POSTGRES_PASSWORD: mypassword
POSTGRES_USER: postgres
POSTGRES_DB: tycho_indexer_0
command: postgres -c shared_preload_libraries=pg_partman_bgw,pg_cron -c cron.database_name=tycho_indexer_0
ports:
- "5431:5432"
shm_size: "1gb"

View File

@@ -23,9 +23,4 @@ USER root
COPY --from=builder /usr/local/lib/postgresql/pg_cron.so /usr/local/lib/postgresql/
COPY --from=builder /usr/local/share/postgresql/extension/pg_cron* /usr/local/share/postgresql/extension/
# Add configuration to postgresql.conf template
# Start with postgres database, then switch to tycho_indexer_0 after it's created
RUN echo "shared_preload_libraries = 'pg_partman_bgw,pg_cron'" >> /usr/local/share/postgresql/postgresql.conf.sample \
&& echo "cron.database_name = 'tycho_indexer_0'" >> /usr/local/share/postgresql/postgresql.conf.sample
USER postgres