mirror of
https://github.com/MOIS3Y/logs-collector.git
synced 2025-02-01 01:10:52 +01:00
Modify: HEALTHCHECK better use in docker-compose.yaml like optional
This commit is contained in:
parent
c316104d94
commit
405d7da754
@ -29,8 +29,7 @@ ARG VERSION=0.1.0 \
|
||||
USER_NAME=collector \
|
||||
USER_GROUP=collector \
|
||||
APP_UID=1000 \
|
||||
APP_GID=1000 \
|
||||
HEALTHCHECK_PATH=api/v1/check/health/
|
||||
APP_GID=1000
|
||||
|
||||
# copy app dependences
|
||||
COPY --from=base /usr/local/lib/python3.10/site-packages/ /usr/local/lib/python3.10/site-packages/
|
||||
@ -61,8 +60,5 @@ EXPOSE ${WEB_PORT}
|
||||
LABEL maintainer="s.zhukovskii@ispsystem.com"
|
||||
LABEL me.zhukovsky.logs-collector.version=v${VERSION}
|
||||
|
||||
# call the health check endpoint of app
|
||||
HEALTHCHECK CMD curl --fail http://localhost:${WEB_PORT}/${HEALTHCHECK_PATH} || exit 1
|
||||
|
||||
# run app
|
||||
ENTRYPOINT [ "sh", "entrypoint.sh" ]
|
||||
|
@ -27,6 +27,12 @@ services:
|
||||
target: ${APP_DIR}/data
|
||||
env_file:
|
||||
- ./.env
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://${WEB_HOST}:${WEB_PORT}/${HEALTHCHECK_URL}"]
|
||||
interval: 1m30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
volumes:
|
||||
logs_collector_data:
|
||||
|
Loading…
Reference in New Issue
Block a user