Web dashboard for Docks
TripleParity/docks contains the latest instructions for deploying Docks using images from Docker Hub
To deploy the latest version of Docks UI:
$ docker stack deploy -c docker-compose.yml docks-ui
The version to be deployed can be changed in the docker-compose.yml
file.
The DOCKS_API_ADDRESS
environment variable can be set.
Default: http://127.0.0.1:8080
When using ng serve
to serve Docks UI, the Docks API address is set in src/config
Default: http://127.0.0.1:8080
This process simulates a production environment.
- Docker 17.05 or higher for multi-stage builds
- Swarm with Manager Node
-
Deploy registry to swarm for serving the docks-ui image
$ docker service create --name registry \ --publish published=5000,target=5000 registry:2
-
Build docks-ui
$ docker build -t 127.0.0.1:5000/docks-ui:local .
-
Push docks-ui to local registry
$ docker push 127.0.0.1:5000/docks-ui:local
-
Deploy docks-api using images from Docker Hub
$ docker stack deploy -c docker-compose-api.yml docks-api
-
Deploy docks-ui using image from local registry
$ docker stack deploy -c docker-compose-ui.local.yml docks-ui
After making changes to docks-ui you need to rebuild the image, push the new image to the registry and the update the docks-ui stack:
$ docker build -t 127.0.0.1:5000/docks-ui:local .
$ docker push 127.0.0.1:5000/docks-ui:local
$ docker stack deploy -c docker-compose-ui.local.yml docks-ui
This process uses a production version of Docks API and Angular CLI to serve a development version of Docks UI. This is the most flexible development process.
- Docker 17.05 or higher for multi-stage builds
- Swarm with Manager Node
- Node.js 8
- Angular CLI 1.7.4 (i.e not Angular 6)
-
Install Angular CLI
$ npm install -g @angular/cli@1.7.4
-
Install node packages
npm install
-
Deploy docks-api to the swarm
$ docker stack deploy -c docker-compose-api.yml docks-api
-
Serve docks-ui using Angular CLI
$ ng serve --aot
The
--aot
flag is required to catch Ahead Of Time errors early as this will be used in production
- Chromium
$ export CHROME_BIN=/usr/bin/chromium-browser
This is the process used when testing on Travis CI
ng test
This process is used for fixing missing dependencies in test cases
ng test --browsers="Chrome" --single-run=false