From dd36984156355c7ce29691922d07a1288cc0abe0 Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Wed, 15 Dec 2021 12:01:02 +0300 Subject: [PATCH] Add 502 error page --- build/nginx/Dockerfile | 6 ++++++ build/nginx/nginx-template.conf | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/nginx/Dockerfile b/build/nginx/Dockerfile index efecf0f2..43cf066a 100644 --- a/build/nginx/Dockerfile +++ b/build/nginx/Dockerfile @@ -66,8 +66,14 @@ RUN yarn run production --app erpnext \ COPY --from=erpnext_node_modules /root/frappe-bench/apps/erpnext/node_modules /root/frappe-bench/apps/erpnext/node_modules +FROM base as error_pages + +RUN git clone --depth 1 https://github.com/frappe/bench /root/bench + + FROM nginx:1.21-alpine as frappe +COPY --from=error_pages /root/bench/bench/config/templates/502.html /usr/share/nginx/html COPY --from=frappe_assets /root/frappe-bench/sites /usr/share/nginx/html COPY nginx-template.conf / diff --git a/build/nginx/nginx-template.conf b/build/nginx/nginx-template.conf index 27a1d3ba..f21c2631 100644 --- a/build/nginx/nginx-template.conf +++ b/build/nginx/nginx-template.conf @@ -69,7 +69,6 @@ server { # error pages error_page 502 /502.html; location /502.html { - root /var/www/templates; internal; }