Skip to content

Extends postgres docker image by adding a few useful pg extensions

License

Notifications You must be signed in to change notification settings

owl-corp/psql_extended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL Extended

Summary

This repo contains the Dockerfile and supplementary files for building a Postgres image including some useful extensions

Extensions installed:

Details

This image was originally derived from official postgres:14-alpine docker image with some modifications since.

docker-entrypoint.sh is directly from docker-library.

A pre-built image is available from GHCR here.

Post deployment steps

pg_cron

Add the following to the bottom of your postgresql.conf file, replacing my_database with the name of the database to make pg_cron available 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.

CREATE EXTENSION pg_cron;

pg_repack

Run the following on the database you want pg_repack to be available in.

CREATE EXTENSION pg_repack;

About

Extends postgres docker image by adding a few useful pg extensions

Resources

License

Stars

Watchers

Forks

Packages