mirror of https://github.com/logos-co/open-law.git
add db healtcheck to docker-compose.yml
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
3ff878b84a
commit
f96573369f
|
@ -1,21 +1,6 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:14
|
||||
restart: always
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-passwd}
|
||||
POSTGRES_DB: db
|
||||
PGDATABASE: db
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:-passwd}
|
||||
PGUSER: ${POSTGRES_USER:-postgres}
|
||||
ports:
|
||||
- '127.0.0.1:${LOCAL_DB_PORT:-15432}:5432'
|
||||
|
||||
app:
|
||||
build: .
|
||||
# restart: always
|
||||
|
@ -31,5 +16,24 @@ services:
|
|||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
db:
|
||||
image: postgres:14
|
||||
restart: always
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-passwd}
|
||||
POSTGRES_DB: db
|
||||
PGDATABASE: db
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:-passwd}
|
||||
PGUSER: ${POSTGRES_USER:-postgres}
|
||||
ports:
|
||||
- '127.0.0.1:${LOCAL_DB_PORT:-15432}:5432'
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}"]
|
||||
interval: 30s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
|
Loading…
Reference in New Issue