🎁 TimescaleDB HA image with common extensions created on first start.
🕹 f3l1x.io | 💻 f3l1x | 🐦 @xf3l1x
TimescaleDB on PostgreSQL, built on the
timescaledb-ha image (timescale/timescaledb-ha) and published
as dockette/timescaledb. It adds SQL that creates common monitoring and contrib extensions.
- TimescaleDB HA
pg18-ts2.30:FROM timescale/timescaledb-ha:pg18-ts2.30, nothing else changed - Extensions are created on first initialization (empty data directory) by SQL in
/docker-entrypoint-initdb.d/ - Entries such as
auto_explainare loaded throughshared_preload_librariesonly and are not separate extensions here - Listen port is
5432
docker run --name some-timescaledb -p 5432:5432 \
-e POSTGRES_PASSWORD=secret \
-v tsdb-data:/home/postgres/pgdata \
dockette/timescaledb:ha-pg18-ts2.30The upstream HA image uses
/home/postgres/pgdata/data as the default PGDATA. Set PGDATA and your volume mount to match your deployment. For
a custom path (for example Nomad mounting /pgdata), use PGDATA=/pgdata/data if that is where PostgreSQL should store
the cluster files.
Init SQL runs only when PGDATA is empty. Existing clusters need a manual CREATE EXTENSION or a migration job.
A bind mount onto /docker-entrypoint-initdb.d replaces the whole directory in the container. The scripts of this
image and the init scripts of upstream are not visible unless your mount includes those files.
- Prefer to drop that mount and use the
/docker-entrypoint-initdb.d/of the image. - If you keep templated SQL in
local/init/, ship every required init file there (more maintenance).
| Version | Release |
|---|---|
dockette/timescaledb:ha-pg18-ts2.30-YYYY.MM.DD |
TimescaleDB HA pg18-ts2.30 in release YYYY.MM.DD; pin this one |
dockette/timescaledb:ha-pg18-ts2.30 |
latest release |
dockette/timescaledb:YYYY.MM.DD |
release YYYY.MM.DD |
dockette/timescaledb:latest |
latest build of master |
All versions build on timescale/timescaledb-ha:pg18-ts2.30. A TimescaleDB upgrade is a release too. Releases are
listed on GitHub.
make build # build the image
make test # check postgres and the init SQL in the image
make version # print VERSION
make release # set today's date in VERSIONAfter make build, a deeper check is to start a container with a fresh volume and POSTGRES_PASSWORD, wait for
pg_isready and run psql -c '\dx' to list the extensions. It is slower than make test.
See how to contribute to this package. Consider to support f3l1x. Thank you for using this package.