Add health check to docker image
This commit is contained in:
parent
353c88d473
commit
fa5a3603ba
|
@ -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"]
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue