26 lines
587 B
YAML
26 lines
587 B
YAML
services:
|
|
db:
|
|
image: registry1.fw.ac.cn/docker.io/postgres:alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: Aa110011
|
|
POSTGRES_DB: fluxent
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
volumes:
|
|
- fluxent-postgres-data:/var/lib/postgresql
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}" -h 127.0.0.1 -p 5432',
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
fluxent-postgres-data:
|