nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

commit 5be5d1b1e5339cb84b7d6a58606c347776182738
parent 6030356baf43d52987b0b328996060a23e872cf9
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sat, 28 Sep 2024 23:59:57 +0200

feat(myheats-nginx): fix 404 page

SPA pages (with React) always need to find the index.html where the
javacript routing action starts.

Diffstat:
Mdocker/docker-myheats-nginx/Dockerfile | 4++++
Adocker/docker-myheats-nginx/myheats.conf | 8++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/docker/docker-myheats-nginx/Dockerfile b/docker/docker-myheats-nginx/Dockerfile @@ -42,4 +42,8 @@ FROM docker.io/nginx:alpine RUN rm -rf /usr/share/nginx/html/* COPY --from=builder /app/dist/ /usr/share/nginx/html/ +# install config file +RUN rm -rf /etc/nginx/conf.d/* +COPY myheats.conf /etc/nginx/conf.d/ + CMD ["nginx", "-g", "daemon off;"] diff --git a/docker/docker-myheats-nginx/myheats.conf b/docker/docker-myheats-nginx/myheats.conf @@ -0,0 +1,8 @@ +server { + listen 80; + + location / { + root /usr/share/nginx/html; + try_files $uri /index.html; + } +}