diff --git a/Dockerfile b/Dockerfile index 61f1816ad7c808be6c5211afb5ae033381d211e9..000db5fe30df748deb6a40b2930ba9c29f7ab944 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ARG nginx_version=latest FROM nginx:${nginx_version} as nginx LABEL uk.org.kodo.maintainer = "Dom Sekotill " COPY data/nginx.conf /etc/nginx/conf.d/default.conf +COPY data/5*.html /app/html/ FROM php:7.3-fpm-alpine as deps diff --git a/data/502.html b/data/502.html new file mode 100644 index 0000000000000000000000000000000000000000..3e722061a0597d604be80189cd5b651b43010207 --- /dev/null +++ b/data/502.html @@ -0,0 +1,107 @@ + + + + + + + + + + Site Unavailable + + + + + + +
+
+ +
+
+

Site Unavailable

+

This site is currently unavailable

+ +
+
+ +
+
+ + + diff --git a/data/nginx.conf b/data/nginx.conf index 551a9278d1da2acad5a5b04bbde355c2fd8e480d..d07c4c979ccc111a4c87688afc4a553d7da97c77 100644 --- a/data/nginx.conf +++ b/data/nginx.conf @@ -25,6 +25,13 @@ server { # Add Cache-Control headers for static files, removed in *.php location add_header Cache-Control "public, max-age=7776000, stale-while-revalidate=86400, stale-if-error=604800"; + error_page 502 /errors/502.html; + + location /errors { + alias /app/html; + internal; + } + location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /app$fastcgi_script_name;