Closed coesensbert closed 1 year ago
@coesensbert Seems logical to set all required env vars based on the current network instead because you gonna use all its partners e.g.
export APP_NETWORK=`dev`
window.configs = {
GQL_URL="https://graphql.dev.grid.tf/graphql"
PROXY_URL="https://gridproxy.dev.grid.tf"
}
in case we will use this approach, the server won't run without the APP_NETWORK
otherwise will raise an error.
@Mahmoud-Emad There is more than dev
, qa
, test
and main
. We are working on setting up private grid stacks for development and testing. People should also be able to create grid instances for local internets.
This does not have to be configurable through environment variables, it can be through a configfile too.
@robvanmieghem @coesensbert
the build script was changed with the requested changes.
one more mode was added called custom
, if you want to add the links by yourself you just have to set the TFCHAIN_NETWORK=custom
otherwise dev
will be selected, also if you missed setting any env var the script will raise an error to you to tell you what you missed.
So what are the required env vars now you have to set before starting the server
Version
-> Which version of the dashboard?optional env vars.
dev
will be selected, the current options are [dev, qa, test, main, custom]
in case you choose one of the tf-chain
that is mentioned above, the script will generate all required env vars for you.
in case you choose a custom
network, you have to set all of those env vars.
TFCHAIN_NETWORK -> Must be custom
to set all env vars below.
Note: Wating for approval from you to merge the changes.
@robvanmieghem please close once verified
Verified on devnet. Was able to use default dev config and custom and serve successfully.
Description
To be able to setup multiple isolated backends we need to be able to set where an instance of the dashboard connects to get it's data. In the future there will be multiple full stack backends running, with their own dashboard that needs to connect to it's own graphql .. etc.
Found this config file where the URLs seem to be hard-coded: /usr/share/nginx/html/config.js
Implementation
We need at least these URLs to be set as environment variables, so we can change them for each instance of the dashboard.
This one could be handy to set the stellar config's? Like the horizon url .. If we hard code them for each net, and then define the net here? Open for suggestions ..