Added docker stuff

This commit is contained in:
Pünkösd Marcell 2020-11-27 01:19:52 +01:00
parent 04041dbc99
commit a307d82f63
3 changed files with 26 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
Dockerfile
node_modules

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:latest AS build
ADD . /app
WORKDIR /app
RUN npm install && npm run build
FROM nginx:stable
COPY --from=build /app/dist /usr/share/nginx/html
ADD nginx-site.conf /etc/nginx/conf.d/default.conf

13
nginx-site.conf Normal file
View File

@ -0,0 +1,13 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}