feat: add TimescaleDB template (#892)

This commit is contained in:
Abdelatif Djeddou
2026-07-07 23:43:15 +02:00
committed by GitHub
parent 8a52825167
commit 3ebc2f850f
4 changed files with 94 additions and 0 deletions

View File

@@ -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:

View File

@@ -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.
"""

View File

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-labelledby="title desc">
<title id="title">TimescaleDB</title>
<desc id="desc">A layered database mark with a time-series pulse.</desc>
<rect width="128" height="128" rx="24" fill="#0b1f3a"/>
<ellipse cx="64" cy="33" rx="38" ry="14" fill="#2bd4bd"/>
<path d="M26 33v46c0 8 17 15 38 15s38-7 38-15V33" fill="none" stroke="#2bd4bd" stroke-width="10"/>
<path d="M26 56c0 8 17 15 38 15s38-7 38-15" fill="none" stroke="#77e5d7" stroke-width="8"/>
<path d="M31 83c8 7 20 11 33 11 21 0 38-7 38-15" fill="none" stroke="#77e5d7" stroke-width="8" stroke-linecap="round"/>
<path d="M31 50h14l8-12 13 31 10-19h21" fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 797 B

View File

@@ -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",