From f09acb1738efb8ea4d376f4b2d5b814228c91cb5 Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Thu, 3 Nov 2016 15:59:49 +0000 Subject: [PATCH] docs: updating setup documentation --- README.md | 25 +++++++++++++++++-------- bin/setup-tools | 2 +- docker-compose.yml | 6 +++--- local-compose.yml | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 97c065b9..fd4e2302 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,14 @@ -# Joyent Dashboard +# Joyent Portal + +Before you begin, you will need to install ensure that `docker` and `docker-compose` are installed correctly, +this can be done by running `make`, make continues without any errors, then you are good to go. ## Setup - ```sh -./bin/setup +make ``` -## Installation + +## Run services To run the stack locally: @@ -13,7 +16,8 @@ To run the stack locally: docker-compose -f local-compose.yml up -d ``` -And then navigate to https://localhost:8000. +This will run the front-end at [http://127.0.0.1:8000](http://127.0.0.1:8000), +the UI framework at [http://127.0.0.1:8001](http://127.0.0.1:8001), ## Development @@ -24,7 +28,7 @@ setup using the triton tool. Currently requires [yarn](https://yarnpkg.com/en/docs/install) for installing dependencies. ``` -make || make install +make && make install ``` Then to run each individual component locally (subject to change). @@ -40,9 +44,10 @@ We will also include multiple PoC's of various bits of functionality from UI's p ``` . -├── frontend -├── ui ├── cloudapi-graphql +├── frontend +├── nginx +├── ui └── spikes ``` @@ -54,6 +59,10 @@ An implementation of the [Joyent CloudAPI](https://apidocs.joyent.com/cloudapi/) The client side code with a dev-server, this also includes the production server for the meantime, however we are looking at moving towards a deployment of the build artifacts to manta, and another server to host these assets. +### nginx + +Nginx will be sitting in-front of the `ui` service, allowing the `ui` to scale out. + ### ui Code for the reusable UI framework. diff --git a/bin/setup-tools b/bin/setup-tools index a90f9957..9d2e65dc 100644 --- a/bin/setup-tools +++ b/bin/setup-tools @@ -48,7 +48,7 @@ get_triton_details() { check_docker_config() { [[ "${DOCKER_HOST:=unset}" == "unset" ]] && { - echo "Run \"docker-compose -f local-compose.yml\" up to run locally" + echo "Run \"docker-compose -f local-compose.yml up\" to run locally" return 0 } diff --git a/docker-compose.yml b/docker-compose.yml index 71c0d361..a6f00d52 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -70,9 +70,9 @@ nginx: restart: always mem_limit: 128m ports: - - 80 - - 443 - - 9090 + - 80:80 + - 443:443 + - 9090:9090 env_file: .env environment: - CONSUL_AGENT=1 diff --git a/local-compose.yml b/local-compose.yml index d3550172..1764a9d4 100644 --- a/local-compose.yml +++ b/local-compose.yml @@ -48,4 +48,4 @@ nginx: links: - consul:consul ports: - - 80 + - 80:8001