更改postgres容器。
This commit is contained in:
12
.env
Normal file
12
.env
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
POSTGRES_USER=ABM_DB_user
|
||||||
|
POSTGRES_PASSWORD=4FynWQfy0AEotP1dgyimrGF7PSDJh1nDYnDwg4hN
|
||||||
|
POSTGRES_DB=ABM_DB
|
||||||
|
|
||||||
|
PGHOST=postgres
|
||||||
|
PGPORT=5432
|
||||||
|
PGUSER=ABM_DB_user
|
||||||
|
PGPASSWORD=4FynWQfy0AEotP1dgyimrGF7PSDJh1nDYnDwg4hN
|
||||||
|
PGDATABASE=ABM_DB
|
||||||
|
|
||||||
|
# 如果你要用 DATABASE_URL,也要 $$:
|
||||||
|
# DATABASE_URL=postgresql+asyncpg://ABM_DB_user:4FynWQfy0AEotP1dgyimrGF7PSDJh1nDYnDwg4hN@postgres:5432/ABM_DB
|
||||||
@@ -45,8 +45,10 @@ services:
|
|||||||
- ./postgres_data:/var/lib/postgresql/data
|
- ./postgres_data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
|
ports:
|
||||||
|
- 5433:5432
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d postgres"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user