TimescaleDB on Dokku.

Just a decorative image for the page.


Dokku is awesome. The Dokku Postgres plugin is awesome. And the postgres plugin allows you to specify the docker image to use for Postgres.

As we want to use Timescale (also awesome) we should be able to simply specify Timescale’s postgres image so that the Dokku plugin can pick that up.

dokku postgres:create analytics-timescaledb --image "timescale/timescaledb" --image-version "2.11.2-pg15"

Unfortunately that does not work. When inspecting we can see that the Timescale postgres image keeps on restarting. Hmm.

dokku postgres:list

NAME          VERSION                             STATUS      EXPOSED PORTS  LINKS
mydb          timescale/timescaledb:2.11.2-pg15   restarting  -              -

The hacky solution is to copy the server certificates from another working postgres data directory into the timescale data directory.

I have zero idea why the timescale data directory does not have any server certificates though.

# cd into a working data directory of another "temporary" postgres server
cp server.* ../../analytics-timescaledb/data/.

That works fine. Happy coding!


Related posts