Skip to content

Commit

Permalink
build: add first draft for Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mweidling committed Jun 26, 2023
1 parent 2d5344a commit a8e66bf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:lts-alpine as build-stage

# make the 'app' folder the current working directory
WORKDIR /app

# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./

# install project dependencies
RUN npm install

# copy project files and folders to the current working directory (i.e. 'app' folder)
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 8093
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit a8e66bf

Please sign in to comment.