mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:11 -04:00
set healthcheck in dockerfile
This commit is contained in:
@@ -22,4 +22,7 @@ RUN apt-get update && \
|
|||||||
apt-get -y install iputils-ping nmap curl && \
|
apt-get -y install iputils-ping nmap curl && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=10s \
|
||||||
|
CMD curl -fs "http://localhost:$DJANGO_PORT/health/" || exit 1
|
||||||
|
|
||||||
CMD ["./run.sh"]
|
CMD ["./run.sh"]
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ services:
|
|||||||
- POSTGRES_PASSWORD=upsnap
|
- POSTGRES_PASSWORD=upsnap
|
||||||
- PING_INTERVAL=5
|
- PING_INTERVAL=5
|
||||||
- ENABLE_NOTIFICATIONS=True
|
- ENABLE_NOTIFICATIONS=True
|
||||||
healthcheck:
|
|
||||||
test: curl --fail -s http://localhost:$DJANGO_PORT/health/ || exit 1
|
|
||||||
interval: 10s
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- upsnap_redis
|
- upsnap_redis
|
||||||
- upsnap_postgres
|
- upsnap_postgres
|
||||||
|
|||||||
Reference in New Issue
Block a user