diff --git a/nodeapp/Dockerfile b/nodeapp/Dockerfile index ab73e298..defc6b9e 100644 --- a/nodeapp/Dockerfile +++ b/nodeapp/Dockerfile @@ -8,9 +8,10 @@ COPY ./nginx/local.conf /etc/nginx/conf.d/local.conf RUN touch ./selfhosted RUN apt-get update -RUN apt-get install -y socat nginx +RUN apt-get install -y socat nginx curl RUN npm install http-server EXPOSE 12596 +HEALTHCHECK CMD curl --fail http://localhost:12596/selfhosted || exit 1 CMD ["bash", "robosats-client.sh"] \ No newline at end of file diff --git a/nodeapp/nginx/local.conf b/nodeapp/nginx/local.conf index 4367b47c..47882866 100644 --- a/nodeapp/nginx/local.conf +++ b/nodeapp/nginx/local.conf @@ -14,10 +14,6 @@ server { listen 12596; server_name robosats_client; - # location /static { - # alias /usr/src/static; - # } - location / { # requests are passed to npm Http-Server proxy_pass http://robosats_http_server; @@ -27,8 +23,8 @@ server { } + # websockets are passed to socat bridge location /ws/ { - # websockets are passed to socat bridge proxy_pass http://robosats_websocket; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -39,4 +35,10 @@ server { location = /favicon.ico { alias /usr/src/robosats/static/assets/images/favicon-96x96.png; } -} + + # do not log healtchecks made against "/selfhosted" + location /selfhosted { + access_log off; + return 200 "OK"; + } +} \ No newline at end of file