We have three nested projects in the repository - admin
, hub
, reader
.
Go to the hub
project folder.
cd hub
Make the storage root folder.
mkdir /tmp/gaia-disk
Create the configuration file for hub
project. The accepted file format is TOML and JSON. Example:
JSON
cat /tmp/hub/config.json
{
"port": 3000,
"driver": "disk",
"readURL": "<http://localhost:8008/>",
"argsTransport": {
"level": "debug",
"handleExceptions": true,
"timestamp": true,
"colorize": false,
"json": true
},
"diskSettings": {
"storageRootDirectory": "/tmp/gaia-disk"
}
}
TOML
cat /tmp/hub/config.toml
port = 3000
driver = "disk"
readURL = "<http://localhost:8008/>"
[argsTransport]
level = "debug"
handleExceptions = true
timestamp = true
colorize = false
json = true
[diskSettings]
storageRootDirectory = "/tmp/gaia-disk"
Install the dependencies of hub
project.
npm install
Build the hub
project.
npm run build
Start the hub
project.
npm start /tmp/hub/config.json
# npm start /tmp/hub/config.toml
Go to the reader
project folder.
cd reader
Create the configuration file for reader
project. Example:
JSON
cat /tmp/reader/config.json
{
"port": 8008
}
TOML
cat /tmp/reader/config.toml
port = 8008
Install the dependencies of reader
project.
npm install
Build the reader
project.
npm run build
Start the reader
project.
npm start /tmp/reader/config.json
# npm start /tmp/reader/config.toml
Go to the admin
project folder.
cd admin
Create the configuration file for admin
project. Example:
JSON
cat /tmp/admin/config.json
{
"argsTransport": {
"level": "debug",
"handleExceptions": true,
"timestamp": true,
"stringify": true,
"colorize": true,
"json": true
},
"port": 8009,
"apiKeys": [ "hello" ],
"gaiaSettings": {
"configPath": "/tmp/hub/config.json"
},
"reloadSettings": {
"command": "/bin/sh",
"argv": [
"-c",
"docker restart docker_hub_1 &"
],
"env": {},
"setuid": 1000,
"setgid": 1000
}
}
TOML
cat /tmp/admin/config.toml
port = 8009
apiKeys = [ "hello" ]
[argsTransport]
level = "debug"
handleExceptions = true
timestamp = true
stringify = true
colorize = true
json = true
[gaiaSettings]
configPath = "/tmp/hub/config.json"
[reloadSettings]
command = "/bin/sh"
argv = [ "-c", "docker restart docker_hub_1 &" ]
env = { }
setuid = 1000
setgid = 1000
Install the dependencies of admin
project.
npm install
Build the admin
project.
npm run build
Start the admin
project.
npm start /tmp/admin/config.json
# npm start /tmp/admin/config.toml