Skip to content

Commit

Permalink
docker setup and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
thewolfpack committed Nov 16, 2017
1 parent 47687cb commit 347a850
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,21 @@ 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).
### docker
```
. .env
docker build -t $DOCKER_IMAGE .
```
Then use docker
```
docker run -p $PORT:$PORT -e API_URL=$API_URL -e PORT=$PORT -ti cncf-ci-dashboard
```
or docker-compose
```
. .env ; docker-compose -p Frontend up
```
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '2'
# networks:
# default:
# external:
# name: nginx-proxy

services:
# nginx-proxy:
# image: jwilder/nginx-proxy
# container_name: nginx-proxy
# ports:
# - "80:80"
# volumes:
# - ../volumes/certs/:/etc/nginx/certs:ro # Cerificares for all Required Domains must be in this Directory
# - /etc/nginx/vhost.d
# - /usr/share/nginx/html
# - /var/run/docker.sock:/tmp/docker.sock:ro

frontend:
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
container_name: frontend

environment:
# VIRTUAL_HOST: api.dev.cncf.ci
# VIRTUAL_PORT: 80
# VIRTUAL_PROTO: http
API_URL: "${API_URL}"
NODE_PORT: 8080
NODE_HOST: 0.0.0.0
ports:
- "${PORT}:8080"

2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cd /dashboard
./bin/create_env_js

HOST=0.0.0.0 PORT=8080 npm run dev
HOST=$NODE_HOST PORT=$NODE_PORT npm run dev

0 comments on commit 347a850

Please sign in to comment.