style inputs, dockerfile

This commit is contained in:
2022-01-15 21:20:34 +01:00
parent ad314311e2
commit 17985e61ec
5 changed files with 51 additions and 4 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM node:lts-alpine
# install simple http server for serving static content
RUN npm install -g http-server
# make the 'app' folder the current working directory
WORKDIR /app
# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]