Skip to content

Commit

Permalink
wegue-oss#83 add Dockerfile with some docu in README
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Jul 18, 2019
1 parent 0c01268 commit f718193
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
@@ -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
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -47,6 +47,26 @@ npm test

For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

## Run with Docker

At a later stage we will make Docker images available via DockerHub. For now
you can build/run as follows:

``` bash
docker build -t meggsimum/wegue:latest .

docker run -it -p 8080:80 meggsimum/wegue:latest

# in browser: open http:/127.0.0.1:8080

```

To run with a custom Wegue JSON config, use Docker Volume Mapping to override the default config:

``` bash
docker run -it -p 8080:80 -v $(pwd)/app-conf-mine.json:/usr/share/nginx/html/static/app-conf.json meggsimum/wegue:latest
```

## Who do I talk to? ###
You need more information or support? Please contact us at:

Expand Down

0 comments on commit f718193

Please sign in to comment.