docker-compose.yaml
services:
timescale:
image: timescale/timescaledb-ha:pg16
network_mode: host
container_name: timescaledb
restart: unless-stopped
privileged: true
deploy:
resources:
limits:
cpus: '8'
memory: '8G'
environment:
- TZ=Asia/Shanghai
- POSTGRES_PASSWORD=123456
volumes:
- ./pgdata:/home/postgres/pgdata
- ./pg_log:/home/postgres/pg_log
- ./var_log:/var/log/timescaledb
logging:
driver: "json-file"
options:
max-file: "5"
max-size: 1024m