-
-
Save MartinHeinz/2ea26ad81a5984de6befdacf855a9255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Remove last line "shared_preload_libraries='citus'" | |
sed -i '$ d' ${PGDATA}/postgresql.conf | |
cat <<EOT >> ${PGDATA}/postgresql.conf | |
shared_preload_libraries='pg_cron' | |
cron.database_name='${POSTGRES_DB:-postgres}' | |
EOT | |
# Required to load pg_cron | |
pg_ctl restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTENSION pg_cron; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM postgres:15.3-bullseye | |
RUN apt-get update && apt install -y curl ca-certificates gnupg | curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null | |
RUN apt-get -y install postgresql-15-cron | |
COPY 002-setup.sh 003-main.sql /docker-entrypoint-initdb.d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment