Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ WORKDIR /app

COPY ["package.json", "./"]
COPY ["gulpfile.js", "./"]
COPY ["app", "./app"]

RUN npm install gulp -g
RUN npm install

COPY ["app", "./app"]

RUN gulp build

CMD ["gulp", "serve"]
CMD ["gulp", "serve"]
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ A browser should launch viewing [https://localhost:3000](https://localhost:3000)

### Option 2: Use Docker

1. docker build --tag devjava .
1. docker run --publish 3000:3000 devjava
1. `docker build --tag devjava .`
1. `docker run --publish 3000:3000 --init -it --rm devjava`

You should then be able to open a browser and visit [https://localhost:3000](https://localhost:3000)

(For a more dynamic development experience avoiding a Docker build after every change, you can mount the local /app folder to the container by adding option `-v $PWD/app:/app/app` to your `docker run` command. Note: $PWD may not work in Windows.)


## Working with Content

Expand Down
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ function serve(done) {
}
});

watch("app/**/*.md", {}, series(build));
watch("app/**/*.html", {}, series(build));
watch("app/scss/*.scss", {}, series(build));
watch("site/**/", {}, browserSync.reload());
watch("app/**/*.md", {interval: 1000, usePolling: true}, series(build));
watch("app/**/*.html", {interval: 1000, usePolling: true}, series(build));
watch("app/scss/*.scss", {interval: 1000, usePolling: true}, series(build));
watch("site/**/", {interval: 1000, usePolling: true}, browserSync.reload());
done();
}

Expand Down