18 lines
579 B
YAML
18 lines
579 B
YAML
|
|
postgres:
|
||
|
|
image: registry.cn-qingdao.aliyuncs.com/jisheyun/postgres:18.1-alpine
|
||
|
|
container_name: postgres
|
||
|
|
environment:
|
||
|
|
- POSTGRES_PASSWORD=JiShe!aqG#5kGgh&0
|
||
|
|
- POSTGRES_DB=jisheiotprodb
|
||
|
|
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --lc-collate=C --lc-ctype=C
|
||
|
|
volumes:
|
||
|
|
- /mnt/dockerdata/postgresql/data:/var/lib/postgresql
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
# 修改为默认的 postgres 用户
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|