A Dockerfile integrating Postgresql with TimescaleDB including some "base" extensions.
679
A Dockerfile integrating Postgresql with TimescaleDB including some "base" extensions
docker pull spitzenidee/postgresql_timescaledb:latestdocker run -d --name postgresql_timescaledb --restart unless-stopped -p 5432:5432 -v <static_pgsql_files>:/var/lib/postgresql/data spitzenidee/postgresql_timescaledb:latestdocker stop postgresql_timescaledbshared_preload_libraries = 'pg_stat_statements,powa,pg_qualstats,pg_stat_kcache,pg_cron,timescaledb'track_io_timing = ondocker start postgresql_timescaledbUse your favorite SQL command line or UI tool to create extensions in your selected database (as a Postgresql superuser, such as "postgres", and possibly in the database "postgres" if you're on defaults from this container image).
SET AUTOCOMMIT=ON;CREATE IF NOT EXISTS EXTENSION http;CREATE IF NOT EXISTS EXTENSION pg_cron;GRANT USAGE ON SCHEMA cron TO regular_pgsql_user;CREATE IF NOT EXISTS EXTENSION timescaledb;, or if upgrading from a previous version ALTER EXTENSION timescaledb UPDATE;The following commands where taken from "https://github.com/dalibo/docker/blob/master/powa/powa-archivist/install_all.sql".
-- Connect to your database as a superuser:SET AUTOCOMMIT=ON;CREATE IF NOT EXISTS EXTENSION hypopg;CREATE database powa;SET AUTOCOMMIT=OFF;-- Reconnect to database "powa"SET AUTOCOMMIT=ON;CREATE IF NOT EXISTS EXTENSION pg_stat_statements;CREATE IF NOT EXISTS EXTENSION btree_gist;CREATE IF NOT EXISTS EXTENSION pg_qualstats;CREATE IF NOT EXISTS EXTENSION pg_stat_kcache;CREATE IF NOT EXISTS EXTENSION pg_track_settings;CREATE IF NOT EXISTS EXTENSION powa;SET AUTOCOMMIT=OFF;-- Reconnect to database "template1"SET AUTOCOMMIT=ON;CREATE IF NOT EXISTS EXTENSION hypopg;SET AUTOCOMMIT=OFF;Also make sure to read the documentations (via the links above) of the individual extensions if you run into any woes.
docker pull dalibo/powa-webdocker run -d --name powa_web --restart unless-stopped -p 8888:8888 --link postgresql_timescaledb:powa-archivist dalibo/powa-web:latest
You can now access the POWA web interface via "http://yourdockerhost:8888/" and log in e.g. via the superuser "postgres" (highly insecure, please read the POWA documentation on how to secure it properly: http://powa.readthedocs.io/en/latest/security.html).Do it! :-)
Content type
Image
Digest
Size
94.1 MB
Last updated
about 8 years ago
docker pull spitzenidee/postgresql_timescaledb