teable/dockers/database-postgres.yml
Pengap 9b4f9eabad
feat: support multi instance (#364)
* feat: upgrade Node, add Redis caching & WebSocket via redis-pubsub

* fix: optimize `X-Request-Id` generation rules

* ci: add db-migrate image build and push

---------

Co-authored-by: pengap <penganpingprivte@gmail.com>
2024-02-19 11:59:30 +08:00

30 lines
795 B
YAML

version: '3.9'
services:
teable-postgres:
image: postgres:15.4
container_name: teable-postgres
hostname: teable-postgres
ports:
- '5432:5432'
networks:
- teable-net
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data:rw
# you may use a bind-mounted host directory instead,
# so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
healthcheck:
test: ['CMD-SHELL', "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
interval: 10s
timeout: 3s
retries: 3
restart: always
volumes:
db_data: