mirror of https://github.com/veops/cmdb.git
chore(docker compose): add api health check
This commit is contained in:
parent
54747fa789
commit
8d044cf935
|
@ -1,5 +1,3 @@
|
||||||
version: '2.19'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
cmdb-db:
|
cmdb-db:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-db:2.3
|
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-db:2.3
|
||||||
|
@ -78,12 +76,18 @@ services:
|
||||||
new:
|
new:
|
||||||
aliases:
|
aliases:
|
||||||
- cmdb-api
|
- cmdb-api
|
||||||
|
healthcheck:
|
||||||
|
timeout: 3s
|
||||||
|
interval: 5s
|
||||||
|
retries: 10
|
||||||
|
test: "ps aux|grep -v grep|grep -v '1 root'|grep gunicorn || exit 1"
|
||||||
|
|
||||||
cmdb-ui:
|
cmdb-ui:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.4.5
|
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.4.5
|
||||||
container_name: cmdb-ui
|
container_name: cmdb-ui
|
||||||
depends_on:
|
depends_on:
|
||||||
- cmdb-api
|
cmdb-api:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
CMDB_API_HOST: cmdb-api:5000
|
CMDB_API_HOST: cmdb-api:5000
|
||||||
|
|
Loading…
Reference in New Issue