Skip to content

Commit

Permalink
Update Docker config and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ozasadnyy committed Feb 21, 2017
1 parent f8a88cd commit 40be43d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 28 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
FROM node

RUN npm i -g polymer-cli bower
RUN npm i -g gulpjs/gulp#4.0
RUN npm i -g bower

RUN useradd -m node
RUN useradd -m node

ADD . /app

USER node
WORKDIR /app
WORKDIR /app

RUN npm install
RUN bower install

EXPOSE 8080
CMD polymer serve
EXPOSE 3000
CMD gulp serve
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Build:

and run:

docker run -it -v "$PWD":/app -p 8080:8080 hoverboard
docker run -it -v "$PWD":/app -p 3000:3000 hoverboard

:book: Read more in [docker docs](/docs/tutorials/docker.md).

Expand All @@ -65,7 +65,7 @@ and [Bower](https://bower.io/):

##### Start the development server

This command serves the app at `http://localhost:8080` and provides basic URL
This command serves the app at `http://localhost:3000` and provides basic URL
routing for the app:

gulp serve
Expand All @@ -78,18 +78,13 @@ routing for the app:
This command performs HTML, CSS, and JS minification on the application
dependencies, and generates a service-worker.js file with code to pre-cache the
dependencies based on the entrypoint and fragments specified in `polymer.json`.
The minified files are output to the `build/unbundled` folder, and are suitable
for serving from a HTTP/2+Push compatible server.

In addition the command also creates a fallback `build/bundled` folder,
generated using fragment bundling, suitable for serving from non
H2/push-compatible servers or to clients that do not support H2/Push.
The minified files are output to the `build`.

gulp

Or you can build in Docker container:

docker run -v "$PWD":/app hoverboard gulp build
docker run -v "$PWD":/app hoverboard gulp

:book: Read more in [deploy docs](/docs/tutorials/deploy.md).

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Now you have prepared the local development environment!

Now you can run the project with local sources:

docker run -it -v "$PWD":/app -p 8080:8080 hoverboard
docker run -it -v "$PWD":/app -p 3000:3000 hoverboard

or build the production version:

docker run -v "$PWD":/app hoverboard polymer build
docker run -v "$PWD":/app hoverboard gulp

For the explanation of the commands and their modifications please refer to https://docs.docker.com/engine/reference/run
24 changes: 12 additions & 12 deletions docs/tutorials/set-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ Or you may use [Docker container for development](docker.md)
npm -v
2.15.8

1. Install Bower.
1. Install [gulp 4](https://github.com/gulpjs/gulp/tree/4.0):

npm i -g gulpjs/gulp#4.0

and Install [Bower](https://bower.io/):

npm install -g bower

Note: the `-g` flag installs Gulp and Bower globally, so you may need to
execute the script with `sudo` privileges. The reason they are installed
globally is because some scripts in the Hoverboard expect `bower` to be
available from the command line.

1. Install [polymer-cli](https://github.com/Polymer/polymer-cli):
Note: the `-g` flag installs Gulp and Bower globally, so you may need to
execute the script with `sudo` privileges. The reason they are installed
globally is because some scripts in the Hoverboard expect `bower` to be
available from the command line.

npm i -g polymer-cli


1. [Fork](https://github.com/gdg-x/hoverboard/fork) this repository

Expand All @@ -41,7 +43,7 @@ Or you may use [Docker container for development](docker.md)

1. Install the application dependencies.

bower install
bower install && npm install

## Directory structure

Expand Down Expand Up @@ -85,7 +87,7 @@ The diagram below is a brief summary of the directories within the PSK.

The Hoverboard is ready to be built and ran locally.

1. `cd` into the base directory of your PSK project.
1. `cd` into the base directory of your Hoverboard project.

1. Serve the app locally.

Expand All @@ -95,8 +97,6 @@ The Hoverboard is ready to be built and ran locally.

gulp

More options you can find on [polymer-cli][polymer-cli] repository.


## Next steps

Expand Down

0 comments on commit 40be43d

Please sign in to comment.