Simplify configuration and add more instructions.

This commit is contained in:
Thomas E Lackey 2020-07-20 12:14:04 -05:00
parent 78fd02e782
commit 1ac66f331e
12 changed files with 111 additions and 54 deletions

View File

@ -20,6 +20,20 @@ Then start the Webpack devserver.
Then load the app: http://localhost:8080.
## Using a KUBE
If you would like to use a KUBE for testing, rather than running all the
services locally, you can specify a different config file when starting:
`config-kube.yml` to use `kube.local` and `config-testnet.yml` to use
`demo.kube.dxos.network`.
For example:
```javascript
cd packages/console-app
CONFIG_FILE=config-kube.yml yarn start
```
## Deploy
```bash

View File

@ -37,4 +37,4 @@ services:
gateway: 'https://kube.local/dxos/ipfs/gateway'
wellknown:
endpoint: 'https://kube.local:9000/.well-known/dxos'
endpoint: 'https://kube.local/.well-known/dxos'

View File

@ -11,8 +11,8 @@ app:
publicUrl: '/console'
api:
server: 'http://127.0.0.1:9004'
path: '/api'
port: 9004
intervalLog: 5000
pollInterval: 10000

View File

@ -0,0 +1,40 @@
#
# NODE_ENV === production
# NOTE: Set CONFIG_FILE to swap out this config file.
#
app:
title: 'Console'
org': 'DXOS'
theme: 'dark'
website: 'https://dxos.org'
publicUrl: '/console'
api:
server: 'https://demo.kube.dxos.network'
path: '/api'
intervalLog: 5000
pollInterval: 10000
system:
debug: 'dxos:console:*'
services:
app:
prefix: '/app'
server: 'https://demo.kube.dxos.network'
wns:
server: 'https://demo.kube.dxos.network/dxos/wns/api'
webui: 'https://demo.kube.dxos.network/dxos/wns/console'
signal:
server: 'wss://demo.kube.dxos.network/dxos/signal'
api: 'https://demo.kube.dxos.network/dxos/signal'
ipfs:
server: 'https://demo.kube.dxos.network/dxos/ipfs/api'
gateway: 'https://demo.kube.dxos.network/dxos/ipfs/gateway'
wellknown:
endpoint: 'https://demo.kube.dxos.network/.well-known/dxos'

View File

@ -1,37 +0,0 @@
#
# NODE_ENV === production
# NOTE: Set CONFIG_FILE to swap out this config file.
#
app:
title: 'Console'
org': 'DXOS'
theme: 'dark'
website: 'https://dxos.org'
publicUrl: '/console'
api:
path: '/api'
intervalLog: 5000
pollInterval: 10000
system:
debug: 'dxos:console:*'
routes:
app:
server: '/app'
wns:
server: '/dxos/wns/api'
webui: '/dxos/wns/console'
signal:
api: '/dxos/signal'
ipfs:
server: '/dxos/ipfs/api'
gateway: '/dxos/ipfs/gateway'
wellknown:
endpoint: '/.well-known/dxos'

View File

@ -10,10 +10,10 @@
"analyzer": "webpack --config webpack-analyzer.config.js",
"build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline",
"build": "yarn dist",
"dist": "yarn clean && cp -f ${CONFIG_FILE:-config.yml.production} config.yml && yarn build:babel && webpack",
"dist": "yarn clean && cp -f config-production.yml config.yml && yarn build:babel && webpack",
"clean": "rm -rf dist",
"lint": "semistandard 'src/**/*.js'",
"start": "cp -f ${CONFIG_FILE:-config.yml.development} config.yml && VERBOSE=true webpack-dev-server --mode development",
"start": "cp -f ${CONFIG_FILE:-config-local.yml} config.yml && VERBOSE=true webpack-dev-server --mode development",
"test": "jest --rootDir ./src --passWithNoTests --no-cache"
},
"author": "DXOS.org",

View File

@ -1,7 +1,7 @@
{
"build": {
"name": "@dxos/console-app",
"buildDate": "2020-06-23T01:40:58.992Z",
"version": "1.0.0-beta.11"
"buildDate": "2020-07-20T17:06:29.786Z",
"version": "1.0.0-beta.16"
}
}

View File

@ -4,7 +4,7 @@ Apollo GraphQL client.
## Usage
Use the following command to run the server at: http://localhost:4000
Use the following command to run the server at: http://localhost:9004
```bash
yarn start
@ -30,7 +30,7 @@ To build the client and serve it directly from the server:
yarn start
```
Then open the app at: http://localhost:4000/console
Then open the app at: http://localhost:9004/console
## Production

View File

@ -22,19 +22,19 @@ system:
services:
app:
prefix: '/app'
server: 'https://xbox.local'
server: 'https://kube.local'
wns:
server: 'https://xbox.local/dxos/wns/api'
webui: 'https://xbox.local/dxos/wns/console'
server: 'https://kube.local/dxos/wns/api'
webui: 'https://kube.local/dxos/wns/console'
signal:
server: 'wss://xbox.local/dxos/signal'
api: 'https://xbox.local/dxos/signal'
server: 'wss://kube.local/dxos/signal'
api: 'https://kube.local/dxos/signal'
ipfs:
server: 'https://xbox.local/dxos/ipfs/api'
gateway: 'https://xbox.local/dxos/ipfs/gateway'
server: 'https://kube.local/dxos/ipfs/api'
gateway: 'https://kube.local/dxos/ipfs/gateway'
wellknown:
endpoint: 'https://xbox.local/.well-known/dxos'
endpoint: 'https://kube.local/.well-known/dxos'

View File

@ -0,0 +1,40 @@
#
# NODE_ENV === production
# NOTE: Set CONFIG_FILE to swap out this config file.
#
app:
title: 'Console'
org': 'DXOS'
theme: 'dark'
website: 'https://dxos.org'
publicUrl: '/console'
api:
path: '/api'
port: 9004
intervalLog: 5000
pollInterval: 10000
system:
debug: 'dxos:console:*'
services:
app:
prefix: '/app'
server: 'https://demo.kube.dxos.network'
wns:
server: 'https://demo.kube.dxos.network/dxos/wns/api'
webui: 'https://demo.kube.dxos.network/dxos/wns/console'
signal:
server: 'wss://demo.kube.dxos.network/dxos/signal'
api: 'https://demo.kube.dxos.network/dxos/signal'
ipfs:
server: 'https://demo.kube.dxos.network/dxos/ipfs/api'
gateway: 'https://demo.kube.dxos.network/dxos/ipfs/gateway'
wellknown:
endpoint: 'https://demo.kube.dxos.network/.well-known/dxos'

View File

@ -18,7 +18,7 @@
"dev": "VERBOSE=true webpack-dev-server --mode development --watch",
"lint": "semistandard 'src/**/*.js'",
"test": "jest --rootDir ./src --passWithNoTests --no-cache",
"start": "CONFIG_FILE=./config.yml BABEL_DISABLE_CACHE=1 nodemon --exec babel-node src/server/main.js -- --verbose"
"start": "CONFIG_FILE=${CONFIG_FILE=./config.yml} BABEL_DISABLE_CACHE=1 nodemon --exec babel-node src/server/main.js -- --verbose"
},
"author": "DXOS.org",
"license": "GPL-3.0",