diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index 562a78e..def0b6a 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -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"] diff --git a/rootfs/setup/nginx.conf b/rootfs/setup/nginx.conf index 1811bc4..ca21636 100644 --- a/rootfs/setup/nginx.conf +++ b/rootfs/setup/nginx.conf @@ -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; }