From 31845dea103746514d58de4a0c379cc73fcf9f57 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 20 Dec 2021 20:05:05 +0000 Subject: [PATCH] Fix docker build and add catchall route --- Dockerfile | 8 ++++++-- scripts/default.conf | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 scripts/default.conf diff --git a/Dockerfile b/Dockerfile index 4d222bcea..88551511e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,10 @@ RUN matrix-video-chat/scripts/dockerbuild.sh FROM nginxinc/nginx-unprivileged:alpine COPY --from=builder /src/matrix-video-chat/dist /app +COPY scripts/default.conf /etc/nginx/conf.d/ -RUN rm -rf /usr/share/nginx/html \ - && ln -s /app /usr/share/nginx/html +USER root + +RUN rm -rf /usr/share/nginx/html + +USER 101 diff --git a/scripts/default.conf b/scripts/default.conf new file mode 100644 index 000000000..2af6c30c7 --- /dev/null +++ b/scripts/default.conf @@ -0,0 +1,10 @@ +server { + listen 8080; + server_name localhost; + + location / { + root /app; + try_files $uri /$uri /index.html; + } +} +