kopia lustrzana https://github.com/kartoza/docker-postgis
add pg-cron back with the image (#284)
rodzic
07747252b2
commit
009f6b3156
|
@ -36,7 +36,7 @@ RUN set -eux \
|
|||
netcat postgresql-${POSTGRES_MAJOR_VERSION}-ogr-fdw \
|
||||
postgresql-${POSTGRES_MAJOR_VERSION}-postgis-${POSTGIS_MAJOR}-scripts \
|
||||
postgresql-plpython3-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-pgrouting \
|
||||
postgresql-server-dev-${POSTGRES_MAJOR_VERSION}
|
||||
postgresql-server-dev-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-cron
|
||||
|
||||
|
||||
RUN echo $POSTGRES_MAJOR_VERSION >/tmp/pg_version.txt
|
||||
|
|
|
@ -249,7 +249,7 @@ if [ -z "$EXTRA_CONF" ]; then
|
|||
fi
|
||||
|
||||
if [ -z "${SHARED_PRELOAD_LIBRARIES}" ]; then
|
||||
SHARED_PRELOAD_LIBRARIES=''
|
||||
SHARED_PRELOAD_LIBRARIES='pg_cron'
|
||||
fi
|
||||
|
||||
if [ -z "$PASSWORD_AUTHENTICATION" ]; then
|
||||
|
|
|
@ -36,6 +36,7 @@ shared_preload_libraries = '${SHARED_PRELOAD_LIBRARIES}'
|
|||
cron.database_name = '${SINGLE_DB}'
|
||||
password_encryption= '${PASSWORD_AUTHENTICATION}'
|
||||
timezone='${TIMEZONE}'
|
||||
cron.use_background_workers = on
|
||||
EOF
|
||||
|
||||
# This script will setup necessary replication settings
|
||||
|
|
|
@ -79,6 +79,11 @@ for db in $(echo ${POSTGRES_DBNAME} | tr ',' ' '); do
|
|||
fi
|
||||
done
|
||||
|
||||
CRON_LOCKFILE="${ROOT_CONF}/.cron_ext.lock"
|
||||
if [ ! -f "${CRON_LOCKFILE}" ]; then
|
||||
su - postgres -c "psql -c 'CREATE EXTENSION IF NOT EXISTS pg_cron cascade;' ${SINGLE_DB}"
|
||||
touch ${CRON_LOCKFILE}
|
||||
fi
|
||||
|
||||
# This should show up in docker logs afterwards
|
||||
su - postgres -c "psql -l 2>&1"
|
||||
|
|
Ładowanie…
Reference in New Issue