mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-12-06 17:27:57 +00:00
Add nginx health check
This commit is contained in:
@@ -48,6 +48,11 @@ http {
|
|||||||
|
|
||||||
autoindex_format html;
|
autoindex_format html;
|
||||||
|
|
||||||
|
location /healthcheck {
|
||||||
|
return 200 'Hi there!';
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
}
|
||||||
|
|
||||||
location /xpop {
|
location /xpop {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
autoindex off;
|
autoindex off;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '3.3'
|
version: '3.4'
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
container_name: xpopweb
|
container_name: xpopweb
|
||||||
@@ -11,6 +11,13 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${PORT:-3000}:3000
|
- ${PORT:-3000}:3000
|
||||||
image: nginx:alpine
|
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:
|
xpop:
|
||||||
container_name: xpop
|
container_name: xpop
|
||||||
image: xpop:service
|
image: xpop:service
|
||||||
|
|||||||
Reference in New Issue
Block a user