Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timescale/timescaledb-docker
Release Docker builds of TimescaleDB
https://github.com/timescale/timescaledb-docker
docker docker-image time-series timescaledb
Last synced: 3 months ago
JSON representation
Release Docker builds of TimescaleDB
- Host: GitHub
- URL: https://github.com/timescale/timescaledb-docker
- Owner: timescale
- License: apache-2.0
- Created: 2017-06-02T15:47:06.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T21:47:34.000Z (4 months ago)
- Last Synced: 2024-07-20T03:27:45.719Z (4 months ago)
- Topics: docker, docker-image, time-series, timescaledb
- Language: Dockerfile
- Size: 159 KB
- Stars: 286
- Watchers: 23
- Forks: 126
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## What is TimescaleDB?
TimescaleDB is an open-source database designed to make SQL scalable
for time-series data. For more information, see
the [Timescale website](https://www.timescale.com).## How to use this image
This image is based on the
official
[Postgres docker image](https://store.docker.com/images/postgres) so
the documentation for that image also applies here, including the
environment variables one can set, extensibility, etc.### Starting a TimescaleDB instance
```
docker run -d --name some-timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg16
```Then connect with an app or the `psql` client:
```
docker run -it --net=host -e PGPASSWORD=password --rm timescale/timescaledb:latest-pg16 psql -h localhost -U postgres
```You can also connect your app via port `5432` on the host machine.
If you are running your docker image for the first time, you can also set an environmental variable, `TIMESCALEDB_TELEMETRY`, to set the level of [telemetry](https://docs.timescale.com/using-timescaledb/telemetry) in the Timescale docker instance. For example, to turn off telemetry, run:
```
docker run -d --name some-timescaledb -p 5432:5432 -e TIMESCALEDB_TELEMETRY=off -e POSTGRES_PASSWORD=password timescale/timescaledb:latest-pg16
```Note that if the cluster has previously been initialized, you should not use this environment variable to set the level of telemetry. Instead, follow the [instructions](https://docs.timescale.com/using-timescaledb/telemetry) in our docs to disable telemetry once a cluster is running.
If you are interested in the latest development snapshot of timescaledb there is also a nightly build available under timescaledev/timescaledb:nightly-pg16 (for PG 14, 15 and 16).
### Notes on timescaledb-tune
We run `timescaledb-tune` automatically on container initialization. By default,
`timescaledb-tune` uses system calls to retrieve an instance's available CPU
and memory. In docker images, these system calls reflect the available resources
on the **host**. For cases where a container is allocated all available
resources on a host, this is fine. But many use cases involve limiting the
amount of resources a container (or the docker daemon) can have on the host.
Therefore, this image looks in the cgroups metadata to determine the
docker-defined limit sizes then passes those values to `timescaledb-tune`.To specify your own limits, use the `TS_TUNE_MEMORY` and `TS_TUNE_NUM_CPUS`
environment variables at runtime:```
docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password -e TS_TUNE_MEMORY=4GB -e TS_TUNE_NUM_CPUS=4 timescale/timescaledb:latest-pg16
```To specify a maximum number of [background workers](https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/about-configuration/#workers), use the `TS_TUNE_MAX_BG_WORKERS` environment variable:
```
docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password -e TS_TUNE_MAX_BG_WORKERS=16 timescale/timescaledb:latest-pg16
```To specify a [maximum number of connections](https://www.postgresql.org/docs/current/runtime-config-connection.html), use the `TS_TUNE_MAX_CONNS` environment variable:
```
docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password -e TS_TUNE_MAX_CONNS=200 timescale/timescaledb:latest-pg16
```To not run `timescaledb-tune` at all, use the `NO_TS_TUNE` environment variable:
```
docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password -e NO_TS_TUNE=true timescale/timescaledb:latest-pg16
```