commit 77fed7d180bca0ea4e5650e2c912db15ea99e06c Author: opac Date: Mon Sep 13 10:08:08 2021 +0200 first commit diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..c0e80cb --- /dev/null +++ b/dockerfile @@ -0,0 +1,13 @@ +FROM node:lts-alpine as build-stage +WORKDIR /app +COPY src/package*.json ./ +RUN npm install +COPY src/. . +RUN rm -rf dist/ +RUN npm run build + +FROM nginx:stable-alpine as production-stage +COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build-stage /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..8776656 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,19 @@ +server { + listen 80; + server_name localhost; + + error_page 404 /custom.html; + + location /{ + root /usr/share/nginx/html; + index index.html index.htm; + include /etc/nginx/mime.types; + } + +location /custom.html{ + root /usr/share/nginx/html; + index index.html index.htm; + include /etc/nginx/mime.types; + try_files $uri $uri/ /index.html; + } +} diff --git a/src b/src new file mode 160000 index 0000000..ddd52cf --- /dev/null +++ b/src @@ -0,0 +1 @@ +Subproject commit ddd52cf09d1d72621addf3539adac756e8476ad7