Skip to content

Commit bfc3446

Browse files
authored
Add healthcheck to nginx service in docker-compose
1 parent b6628c6 commit bfc3446

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

examples/excalidraw/docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ services:
1616
find /usr/share/nginx/html/assets -type f -name "*.js" -exec sed -i 's|https://oss-collab\.excalidraw\.com|'$$VITE_APP_WS_SERVER_URL'|g' {} +
1717
echo "Starting nginx..."
1818
nginx -g 'daemon off;'
19+
stdin_open: true
20+
healthcheck:
21+
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:80/ >/dev/null 2>&1 || exit 1"]
22+
interval: 30s
23+
timeout: 5s
24+
retries: 3
25+
start_period: 20s
1926
environment:
2027
- NODE_ENV=production
2128
- VITE_APP_WS_SERVER_URL=https://draw2gether.example.com # define your custom url for selfhosted excalidraw-room below
@@ -35,6 +42,12 @@ services:
3542
expose:
3643
- 80
3744
restart: unless-stopped
45+
healthcheck:
46+
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:80/ >/dev/null 2>&1 || exit 1"]
47+
interval: 30s
48+
timeout: 5s
49+
retries: 3
50+
start_period: 20s
3851
#networks:
3952
# - proxy
4053
#labels:

0 commit comments

Comments
 (0)