From 97a100d52f6537cccd2fde717837af561dbed2d9 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Thu, 30 Mar 2023 22:07:21 -0600 Subject: [PATCH 1/4] Add hosting template config file --- config-hosted.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 config-hosted.yml diff --git a/config-hosted.yml b/config-hosted.yml new file mode 100644 index 0000000..4c2ea14 --- /dev/null +++ b/config-hosted.yml @@ -0,0 +1,40 @@ +# +# NODE_ENV=development +# NOTE: Set CONFIG_FILE to swap out this config file. +# + +app: + title: 'Console' + org': 'Laconic' + theme: 'dark' + website: 'LACONIC_HOSTED_CONFIG_APP_WEBSITE' # e.g. https://laconic.com + publicUrl: '/console' + +api: + server: 'LACONIC_HOSTED_CONFIG_API_SERVER' # e.g. http://127.0.0.1:9004 + path: '/api' + intervalLog: 5000 + pollInterval: 10000 + +system: + debug: 'laconic:console:*' + +services: + app: + prefix: '/app' + server: 'LACONIC_HOSTED_CONFIG_SERVICES_APP_SERVER' # e.g. http://127.0.0.1:5999 + + wns: + server: 'LACONIC_HOSTED_CONFIG_SERVICES_WNS_SERVER' # e.g. http://127.0.0.1:9473/api + webui: 'LACONIC_HOSTED_CONFIG_SERVICES_WNS_WEBUI' # e.g. http://127.0.0.1:9473/console + + signal: + server: 'LACONIC_HOSTED_CONFIG_SERVICES_SIGNAL_SERVER' # e.g. ws://127.0.0.1:4000 + api: 'LACONIC_HOSTED_CONFIG_SERVICES_SIGNAL_API' # e.g. http://127.0.0.1:4000/api + + ipfs: + server: 'LACONIC_HOSTED_CONFIG_SERVICES_IPFS_SERVER' # e.g. http://127.0.0.1:5001 + gateway: 'LACONIC_HOSTED_CONFIG_SERVICES_IPFS_GATEWAY' # e.g. http://127.0.0.1:8888/ipfs/ + + wellknown: + endpoint: 'LACONIC_HOSTED_CONFIG_SERVICES_WELLKNOWN_ENDPOINT' # e.g. http://127.0.0.1:9000/.well-known/laconic From 41d227846357be187059c29b08661e04bd7f81e9 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Fri, 31 Mar 2023 06:21:34 -0600 Subject: [PATCH 2/4] Use hosting config in build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 00eabd8..3838909 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "yarn dist", "build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline", "clean": "rm -rf dist", - "dist": "yarn clean && yarn build:babel && CONFIG_FILE=config-production.yml webpack", + "dist": "yarn clean && yarn build:babel && CONFIG_FILE=config-hosted.yml webpack", "lint": "semistandard 'src/**/*.js'", "start": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development", "test": "jest --rootDir ./src --passWithNoTests --no-cache" From e1b05a4c342ee589bd21fe8c22f3bf593831cbc6 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Fri, 31 Mar 2023 14:55:09 -0600 Subject: [PATCH 3/4] Use lowercase --- config-hosted.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/config-hosted.yml b/config-hosted.yml index 4c2ea14..0f132ad 100644 --- a/config-hosted.yml +++ b/config-hosted.yml @@ -3,15 +3,17 @@ # NOTE: Set CONFIG_FILE to swap out this config file. # +# TODO: write a tool to automated insertion of the template strings in files like this. + app: title: 'Console' org': 'Laconic' theme: 'dark' - website: 'LACONIC_HOSTED_CONFIG_APP_WEBSITE' # e.g. https://laconic.com + website: 'LACONIC_HOSTED_CONFIG_app_website' # e.g. https://laconic.com publicUrl: '/console' api: - server: 'LACONIC_HOSTED_CONFIG_API_SERVER' # e.g. http://127.0.0.1:9004 + server: 'LACONIC_HOSTED_CONFIG_api_server' # e.g. http://127.0.0.1:9004 path: '/api' intervalLog: 5000 pollInterval: 10000 @@ -22,19 +24,19 @@ system: services: app: prefix: '/app' - server: 'LACONIC_HOSTED_CONFIG_SERVICES_APP_SERVER' # e.g. http://127.0.0.1:5999 + server: 'LACONIC_HOSTED_CONFIG_services_app_server' # e.g. http://127.0.0.1:5999 wns: - server: 'LACONIC_HOSTED_CONFIG_SERVICES_WNS_SERVER' # e.g. http://127.0.0.1:9473/api - webui: 'LACONIC_HOSTED_CONFIG_SERVICES_WNS_WEBUI' # e.g. http://127.0.0.1:9473/console + server: 'LACONIC_HOSTED_CONFIG_services_wns_server' # e.g. http://127.0.0.1:9473/api + webui: 'LACONIC_HOSTED_CONFIG_services_wns_webui' # e.g. http://127.0.0.1:9473/console signal: - server: 'LACONIC_HOSTED_CONFIG_SERVICES_SIGNAL_SERVER' # e.g. ws://127.0.0.1:4000 - api: 'LACONIC_HOSTED_CONFIG_SERVICES_SIGNAL_API' # e.g. http://127.0.0.1:4000/api + server: 'LACONIC_HOSTED_CONFIG_services_signal_server' # e.g. ws://127.0.0.1:4000 + api: 'LACONIC_HOSTED_CONFIG_services_signal_api' # e.g. http://127.0.0.1:4000/api ipfs: - server: 'LACONIC_HOSTED_CONFIG_SERVICES_IPFS_SERVER' # e.g. http://127.0.0.1:5001 - gateway: 'LACONIC_HOSTED_CONFIG_SERVICES_IPFS_GATEWAY' # e.g. http://127.0.0.1:8888/ipfs/ + server: 'LACONIC_HOSTED_CONFIG_services_ipfs_server' # e.g. http://127.0.0.1:5001 + gateway: 'LACONIC_HOSTED_CONFIG_services_ipfs_gateway' # e.g. http://127.0.0.1:8888/ipfs/ wellknown: - endpoint: 'LACONIC_HOSTED_CONFIG_SERVICES_WELLKNOWN_ENDPOINT' # e.g. http://127.0.0.1:9000/.well-known/laconic + endpoint: 'LACONIC_HOSTED_CONFIG_services_wellknown_endpoint' # e.g. http://127.0.0.1:9000/.well-known/laconic From 59ec22ea348ebab5ec1494f5c8ca7a77a25d7b5b Mon Sep 17 00:00:00 2001 From: David Boreham Date: Sat, 1 Apr 2023 13:38:01 -0600 Subject: [PATCH 4/4] Make default config file the same as before --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3838909..ee050c6 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "build": "yarn dist", "build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline", "clean": "rm -rf dist", - "dist": "yarn clean && yarn build:babel && CONFIG_FILE=config-hosted.yml webpack", + "dist": "yarn clean && yarn build:babel && CONFIG_FILE=${LACONIC_HOSTED_CONFIG_FILE:-config-production.yml} webpack", "lint": "semistandard 'src/**/*.js'", "start": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development", "test": "jest --rootDir ./src --passWithNoTests --no-cache"