Skip to content

Commit

Permalink
Docker: create extesion for new databases by default (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
dAdAbird authored Oct 14, 2023
1 parent 86d255f commit b8b02b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN cp /usr/share/postgresql/postgresql.conf.sample /etc/postgresql/postgresql.c
echo "{'provider': 'file','datafile': '/tmp/pgkeyring',}" > /etc/postgresql/tde_conf.json; \
chown postgres /etc/postgresql/tde_conf.json; \
mkdir -p /docker-entrypoint-initdb.d
COPY ./docker/pg-tde-create-ext.sql /docker-entrypoint-initdb.d/pg-tde-create-ext.sql
COPY ./docker/pg-tde-create-ext.sh /docker-entrypoint-initdb.d/pg-tde-create-ext.sh

VOLUME /etc/postgresql/

Expand Down
4 changes: 4 additions & 0 deletions docker/pg-tde-create-ext.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

psql -c 'CREATE EXTENSION pg_tde;'
psql -d template1 -c 'CREATE EXTENSION pg_tde;'
1 change: 0 additions & 1 deletion docker/pg-tde-create-ext.sql

This file was deleted.

0 comments on commit b8b02b7

Please sign in to comment.