From 6a913f35c65a2503d2f9726f30ec9d6ea0d59771 Mon Sep 17 00:00:00 2001 From: Marco Zeisler Date: Tue, 4 May 2021 21:32:30 +0200 Subject: [PATCH] copy nginx conf added default.conf --- frontend/Dockerfile | 4 +++- frontend/nginx/conf.d/default.conf | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 frontend/nginx/conf.d/default.conf diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 0ce477b..13f78c6 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -12,6 +12,8 @@ RUN npm ci && npm run build FROM nginx:alpine -COPY --from=build-image /app/dist/app-fe /usr/share/nginx/html +COPY --from=build-image /app/dist/app-fe /usr/share/nginx/html +COPY ./nginx/conf.d /etc/nginx/ +RUN nginx -s reload EXPOSE 80 diff --git a/frontend/nginx/conf.d/default.conf b/frontend/nginx/conf.d/default.conf new file mode 100644 index 0000000..1fc22bf --- /dev/null +++ b/frontend/nginx/conf.d/default.conf @@ -0,0 +1,10 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + location / { + try_files $uri $uri/ /index.html; + } +} +