chore(db): add local PostgreSQL Compose setup
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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:
|
||||
Reference in New Issue
Block a user