Add health check to docker image

This commit is contained in:
Marko Bocevski 2017-04-07 09:34:40 +02:00
parent 353c88d473
commit fa5a3603ba
2 changed files with 13 additions and 0 deletions

View File

@ -73,4 +73,6 @@ COPY setup ${APP_DIR}
EXPOSE 5000
HEALTHCHECK --interval=10s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit 1
CMD ["/srv/app/start_ckan.sh"]

View File

@ -23,6 +23,17 @@ http {
auth_basic "Restricted";
auth_basic_user_file /srv/app/.htpasswd;
proxy_pass http://127.0.0.1:4000/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
}
location /api/3/action/status_show {
auth_basic "off";
proxy_pass http://127.0.0.1:4000/api/3/action/status_show;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
}