From 18dad062f69bc08e093d476e3f004c38fdf93cda Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Fri, 27 Jun 2025 09:09:14 -0700 Subject: [PATCH] fix(docker): Improved routing for dex-ui docker container --- production/docker/bch-dex-ui/Dockerfile | 3 +++ production/docker/bch-dex-ui/default.conf | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 production/docker/bch-dex-ui/default.conf diff --git a/production/docker/bch-dex-ui/Dockerfile b/production/docker/bch-dex-ui/Dockerfile index b8f2795..604aa0c 100644 --- a/production/docker/bch-dex-ui/Dockerfile +++ b/production/docker/bch-dex-ui/Dockerfile @@ -70,4 +70,7 @@ EXPOSE 80 # Copy the files built in the first container to the new NGINX container. COPY --from=builder /home/safeuser/bch-dex-ui-v3/build /usr/share/nginx/html +# Copy the NGINX configuration file. +COPY default.conf /etc/nginx/conf.d/default.conf + #USER safeuser diff --git a/production/docker/bch-dex-ui/default.conf b/production/docker/bch-dex-ui/default.conf new file mode 100644 index 0000000..2e7845d --- /dev/null +++ b/production/docker/bch-dex-ui/default.conf @@ -0,0 +1,23 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} +