mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-12-05 08:48:11 +00:00
Add nginx health check
This commit is contained in:
@@ -48,6 +48,11 @@ http {
|
||||
|
||||
autoindex_format html;
|
||||
|
||||
location /healthcheck {
|
||||
return 200 'Hi there!';
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
location /xpop {
|
||||
root /usr/share/nginx/html;
|
||||
autoindex off;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3.3'
|
||||
version: '3.4'
|
||||
services:
|
||||
nginx:
|
||||
container_name: xpopweb
|
||||
@@ -11,6 +11,13 @@ services:
|
||||
ports:
|
||||
- ${PORT:-3000}:3000
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: curl --fail http://localhost:3000/healthcheck || exit 1
|
||||
interval: 15s
|
||||
retries: 2
|
||||
start_period: 5s
|
||||
timeout: 5s
|
||||
xpop:
|
||||
container_name: xpop
|
||||
image: xpop:service
|
||||
|
||||
Reference in New Issue
Block a user