Skip to content

Commit 11a04d3

Browse files
author
Sebastian Boolean
committed
change default port to 3000
1 parent d617940 commit 11a04d3

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# vue-cli-plugin-docker-nginx
22

3-
> vue-cli-plugin that adds a minimal docker deployment using a nginx server to serve your static files
3+
> having a node container running an express server seemed kind of overkill for serving a built vue-app
44
5-
## Installation
5+
This is a vue-cli-plugin that adds a minimal docker deployment (**~19MB** + static files) using nginx to serve your vue-app
6+
7+
### Installation
68

79
```
810
vue add vue-cli-plygin-docker-nginx
@@ -16,7 +18,13 @@ This will automatically add all the files needed to your existing vue-cli projec
1618
npm run docker
1719
```
1820

19-
This will build a docker container and run it on a free port. Please make sure to have [docker](https://docs.docker.com/install/) installed and running on your machine.
21+
This will build a docker container and run it on port `3000`. If you want to run it on different port change the run script in your `package.json` to
22+
23+
```
24+
"docker": "docker build . -t vue-app && docker run -d -p <PORT>:80 vue-app"
25+
```
26+
27+
Please make sure to have [docker](https://docs.docker.com/install/) installed and running on your machine.
2028

2129
### Tweak nginx config
2230

generator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = api => {
22
api.extendPackage({
33
scripts: {
4-
docker: 'docker build . -t vue-app && docker run -d -p:80 vue-app',
4+
docker: 'docker build . -t vue-app && docker run -d -p 3000:80 vue-app',
55
},
66
});
77
api.render('./template');

0 commit comments

Comments
 (0)