mirror of
https://github.com/teableio/teable
synced 2024-11-21 23:04:16 +00:00
30 lines
795 B
YAML
30 lines
795 B
YAML
|
version: '3.9'
|
||
|
|
||
|
services:
|
||
|
teable-postgres:
|
||
|
container_name: teable-postgres
|
||
|
image: postgres:15.4
|
||
|
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:
|