DONE: fix health issues on db service
This commit is contained in:
+2
-1
@@ -3,7 +3,8 @@ APP_ENV=production
|
||||
APP_KEY=base64:XdMAy5IbQMHsTrp1N7Tn/LIJC4SKenN8CfhYLt1s3tk=
|
||||
APP_DEBUG=false
|
||||
APP_TIMEZONE=Asia/Kuala_Lumpur
|
||||
APP_URL=https://api.koppkb.com
|
||||
APP_URL=http://localhost
|
||||
APP_PORT=8080
|
||||
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
|
||||
@@ -62,17 +62,20 @@ services:
|
||||
ports:
|
||||
- "${DB_PORT:-5433}:5432"
|
||||
environment:
|
||||
- POSTGRES_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
|
||||
- POSTGRES_DATABASE=${DB_DATABASE}
|
||||
- POSTGRES_USER=${DB_USERNAME}
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
- POSTGRES_DB=${DB_DATABASE}
|
||||
volumes:
|
||||
- db-data-production:/var/lib/postgres
|
||||
- ./be/docker/postgres/conf.d:/etc/postgres/conf.d:ro
|
||||
networks:
|
||||
- mykopkb-production-network
|
||||
healthcheck:
|
||||
test: ["CMD", "postgres", "ping", "-h", "localhost"]
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB" || exit 1',
|
||||
]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user