forked from wegue-oss/wegue
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wegue-oss#83 add Dockerfile with some docu in README
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Modeled from: https://vuejs.org/v2/cookbook/dockerize-vuejs-app.htm | ||
|
||
# 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 | ||
LABEL maintainer="Just van den Broecke <https://github.com/justb4>" | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
# now run with e.g. | ||
# docker run -it -p 8080:80 meggsimum/wegue:latest | ||
# | ||
# Or map your own application config file: | ||
# docker run -it -p 8080:80 -v $(pwd)/app-conf-mine.json:/usr/share/nginx/html/static/app-conf.json meggsimum/wegue:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters