add Dockerfile
parent
06c7cd01b3
commit
cdbd809a0a
|
@ -0,0 +1 @@
|
||||||
|
.gitignore
|
|
@ -1,30 +1,23 @@
|
||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# IDEs
|
# IDEs
|
||||||
.idea
|
.idea
|
||||||
*.iml
|
*.iml
|
||||||
.vscode
|
.vscode
|
||||||
.atom
|
.atom
|
||||||
*.swp
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
# dependencies
|
# NPM
|
||||||
/node_modules
|
node_modules
|
||||||
/.pnp
|
|
||||||
.pnp.js
|
|
||||||
|
|
||||||
# testing
|
# Production
|
||||||
/coverage
|
build
|
||||||
|
|
||||||
# production
|
# Sensitive data
|
||||||
/build
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
.env.local
|
.env.local
|
||||||
.env.development.local
|
.env.development.local
|
||||||
.env.test.local
|
.env.test.local
|
||||||
.env.production.local
|
.env.production.local
|
||||||
|
|
||||||
npm-debug.log*
|
# Miscellaneous
|
||||||
yarn-debug.log*
|
.DS_Store
|
||||||
yarn-error.log*
|
*.log*
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
FROM node:16-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install app dependencies
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
# Build the app
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM nginx:1.20-alpine AS server
|
||||||
|
|
||||||
|
COPY --from=builder /app/dist/ usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
@ -0,0 +1,18 @@
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/html text/plain text/css text/xml text/javascript application/javascript application/x-javascript;
|
||||||
|
gzip_min_length 1024;
|
||||||
|
gzip_vary on;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
}
|
Loading…
Reference in New Issue