From 3ebc2f850f621e7d61e8d2a05d7a9561be31be24 Mon Sep 17 00:00:00 2001 From: Abdelatif Djeddou <155508467+BinkyTwin@users.noreply.github.com> Date: Tue, 7 Jul 2026 23:43:15 +0200 Subject: [PATCH] feat: add TimescaleDB template (#892) --- blueprints/timescaledb/docker-compose.yml | 25 ++++++++++++++ blueprints/timescaledb/template.toml | 40 +++++++++++++++++++++++ blueprints/timescaledb/timescaledb.svg | 10 ++++++ meta.json | 19 +++++++++++ 4 files changed, 94 insertions(+) create mode 100644 blueprints/timescaledb/docker-compose.yml create mode 100644 blueprints/timescaledb/template.toml create mode 100644 blueprints/timescaledb/timescaledb.svg diff --git a/blueprints/timescaledb/docker-compose.yml b/blueprints/timescaledb/docker-compose.yml new file mode 100644 index 00000000..bd136801 --- /dev/null +++ b/blueprints/timescaledb/docker-compose.yml @@ -0,0 +1,25 @@ +version: "3.8" + +services: + timescaledb: + image: timescale/timescaledb:2.26.4-pg17 + restart: unless-stopped + expose: + - 5432 + environment: + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + TIMESCALEDB_TELEMETRY: ${TIMESCALEDB_TELEMETRY} + volumes: + - timescaledb-data:/var/lib/postgresql/data + - ../files/001_create_timescaledb.sql:/docker-entrypoint-initdb.d/001_create_timescaledb.sql:ro + healthcheck: + test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""] + interval: 10s + timeout: 5s + retries: 5 + start_period: 20s + +volumes: + timescaledb-data: diff --git a/blueprints/timescaledb/template.toml b/blueprints/timescaledb/template.toml new file mode 100644 index 00000000..7ebe8fc3 --- /dev/null +++ b/blueprints/timescaledb/template.toml @@ -0,0 +1,40 @@ +[variables] +postgres_user = "${username}" +postgres_password = "${password:32}" +postgres_db = "timescaledb" +timescaledb_telemetry = "off" + +[config] +mounts = [] + +[config.env] +POSTGRES_USER = "${postgres_user}" +POSTGRES_PASSWORD = "${postgres_password}" +POSTGRES_DB = "${postgres_db}" +TIMESCALEDB_TELEMETRY = "${timescaledb_telemetry}" + +[[config.mounts]] +filePath = "001_create_timescaledb.sql" +content = """ +CREATE EXTENSION IF NOT EXISTS timescaledb; +""" + +[[config.mounts]] +filePath = "README.md" +content = """ +# TimescaleDB + +TimescaleDB is deployed as a PostgreSQL-compatible database on the internal `timescaledb:5432` service. + +Connection values: + +- Host: `timescaledb` +- Port: `5432` +- Database: `${postgres_db}` +- Username: `${postgres_user}` +- Password: generated by Dokploy + +The template creates the TimescaleDB extension during first initialization. PostgreSQL initialization variables only apply when the data volume is empty. + +Telemetry is disabled by default with `TIMESCALEDB_TELEMETRY=off`. The image runs `timescaledb-tune` automatically on first initialization and reads Docker cgroup limits when available. +""" diff --git a/blueprints/timescaledb/timescaledb.svg b/blueprints/timescaledb/timescaledb.svg new file mode 100644 index 00000000..d7bb10c4 --- /dev/null +++ b/blueprints/timescaledb/timescaledb.svg @@ -0,0 +1,10 @@ + + TimescaleDB + A layered database mark with a time-series pulse. + + + + + + + diff --git a/meta.json b/meta.json index 431878e4..19cc4f45 100644 --- a/meta.json +++ b/meta.json @@ -6634,6 +6634,25 @@ "uptime" ] }, + { + "id": "timescaledb", + "name": "TimescaleDB", + "version": "2.26.4-pg17", + "description": "TimescaleDB is an open-source time-series database packaged as a PostgreSQL extension, optimized for fast ingest and real-time analytics with standard SQL.", + "logo": "timescaledb.svg", + "links": { + "github": "https://github.com/timescale/timescaledb", + "website": "https://www.tigerdata.com/", + "docs": "https://docs.timescale.com/" + }, + "tags": [ + "database", + "postgresql", + "time-series", + "analytics", + "sql" + ] + }, { "id": "tolgee", "name": "Tolgee",