The site is currently down for maintenance.
+Sorry for the inconvenience.
+diff --git a/VERSION b/VERSION index 98dd696..f00fa32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.31 +2.1.32 diff --git a/nginx/conf.d-prod/ubkg-download.conf b/nginx/conf.d-prod/ubkg-download.conf new file mode 100644 index 0000000..22c5684 --- /dev/null +++ b/nginx/conf.d-prod/ubkg-download.conf @@ -0,0 +1,66 @@ +# Port 80 on host maps to 8080 on container +server { + # Only root can listen on ports below 1024, we use higher-numbered ports + # since nginx is running under non-root user hubmap + listen 8080; + server_name ubkg-downloads.xconsortia.org; + + location / { + return 301 https://$host$request_uri; + } +} + +# Port 443 on host maps to 4430 on container +server { + # Only root can listen on ports below 1024, we use higher-numbered ports + # since nginx is running under non-root user hubmap + listen 4430 ssl; # managed by Certbot + server_name ubkg-downloads.xconsortia.org; + root /usr/share/nginx/html; + + ssl_certificate /etc/letsencrypt/live/gateway.api.hubmapconsortium.org/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/gateway.api.hubmapconsortium.org/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + + # Logging to the mounted volume for outside container access + access_log /usr/src/app/log/nginx_access_ubkg-download.log; + error_log /usr/src/app/log/nginx_error_ubkg-download.log warn; + + # No auth_request for favicon + location = /favicon.ico { + alias /usr/share/nginx/html/favicon.ico; + } + + location / { + # If the file named `maintenance.on` exitis under the target directory + # proxy all the requests to that port of this same container that serves the maintenance page + if (-f /usr/share/nginx/html/ubkg-download-maintenance/maintenance.on) { + # Use IP v4 "127.0.0.1" instead of "localhost" to avoid 502 error caused by DNS failure + proxy_pass http://127.0.0.1:5035; + } + + proxy_pass http://ubkg-download:3000; + } + +} + +# Port 5035 runs the ubkg-download-maintenance static page index.html +# No need to public this port from the container to host +server { + # Only root can listen on ports below 1024, we use higher-numbered ports + # since nginx is running under non-root user hubmap + listen 5035; + + server_name localhost; + + root /usr/share/nginx/html/ubkg-download-maintenance; + + # Direct all requests to maintenance index.html + # Except the static resources calls from within the maintenance index.html + location / { + # Must use /index.html rather than index.html + try_files $uri /index.html =404; + } +} + diff --git a/nginx/html/ubkg-download-maintenance/favicon.ico b/nginx/html/ubkg-download-maintenance/favicon.ico new file mode 100644 index 0000000..d2a599a Binary files /dev/null and b/nginx/html/ubkg-download-maintenance/favicon.ico differ diff --git a/nginx/html/ubkg-download-maintenance/index.html b/nginx/html/ubkg-download-maintenance/index.html new file mode 100644 index 0000000..ff82538 --- /dev/null +++ b/nginx/html/ubkg-download-maintenance/index.html @@ -0,0 +1,39 @@ + + +
+ + +The site is currently down for maintenance.
+Sorry for the inconvenience.
+