From 390c58f4e47f278ad9ecfe5b8248f8e8b21db1df Mon Sep 17 00:00:00 2001 From: ChrisJL Date: Sun, 12 Dec 2021 20:27:29 +0000 Subject: Explain how to configure extension within README --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a49820..8feb853 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,16 @@ This image is derived from official [postgres:14-alpine](https://hub.docker.com/ A pre-build image of this Dockerfile is available from GHCR [here](https://github.com/ChrisLovering/psql_pg_cron/pkgs/container/psql_pg_cron). -Once deployed, you can add the pg_cron extension to the database of choice by connecting to the DB and running +Once deployed, you nned to add the following to the bottom of your postgresql.conf file, replacing `my_database` with the name of the database you want pg_cron to be used in, making sure to reboot postgres after doing so. + +This can't be done within this base image itself, as that would stop it from working within docker-compose. + +``` +shared_preload_libraries = 'pg_cron' +cron.database_name = 'my_database' +``` + +You can then enable the pg_cron extension on that database by running the following within that database. ```sql CREATE EXTENSION pg_cron -- cgit v1.2.3