Add docker stuff
This commit is contained in:
parent
cafa4d9640
commit
e516c81f03
|
@ -1,8 +1,6 @@
|
|||
node_modules
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
build
|
||||
public
|
||||
content
|
||||
config
|
||||
.git
|
||||
public/
|
||||
.git/
|
||||
.cache/
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
FROM node:13.8.0 as front
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./ /app/
|
||||
|
||||
RUN yarn install
|
||||
RUN yarn run build
|
||||
|
||||
FROM nginx:1.17.8-alpine
|
||||
RUN rm -rf /usr/share/nginx/html
|
||||
COPY --from=front /app/public/ /usr/share/nginx/html
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
|
@ -0,0 +1,21 @@
|
|||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
index index.html;
|
||||
autoindex off;
|
||||
charset urtf-8;
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
location ~* \.(html)$ {
|
||||
add_header Cache-Control "no-store";
|
||||
expires off;
|
||||
}
|
||||
|
||||
rewrite ^([^.\?]*[^/])$ $1/ permanent;
|
||||
|
||||
try_files $uri $uri/ $uri/index.html =404;
|
||||
}
|
Loading…
Reference in New Issue