1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

add usage instructions for network env var

This commit is contained in:
Matthias Kretschmann 2019-12-18 10:09:39 +01:00
parent 5d40c87c07
commit a2c94b879f
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 50 additions and 17 deletions

View File

@ -30,6 +30,7 @@ If you're a developer and want to contribute to, or want to utilize this marketp
- [⛵️ Environment Variables](#-environment-variables)
- [Client](#client)
- [Server](#server)
- [Network & Endpoint Switches](#network-amp-endpoint-switches)
- [Feature Switches](#feature-switches)
- [More Settings](#more-settings)
- [👩‍🔬 Testing](#-testing)
@ -64,7 +65,7 @@ To make use of all the functionality, you need to connect to an Ocean network.
By default, the client will connect to Ocean components running within [Ocean's Pacific network](https://docs.oceanprotocol.com/concepts/pacific-network/) remotely.
By default, the client uses a burner wallet connected to the correct network automatically. If you choose to use MetaMask, you need to connect to the Pacific network. To do this:
By default, the client uses a burner wallet connected to the correct network automatically. If you choose to use MetaMask, you need to connect to the Pacific network with it too. To do this:
1. select Custom RPC in the network dropdown in MetaMask
2. under New Network, enter `https://pacific.oceanprotocol.com` as the custom RPC URL
@ -135,6 +136,23 @@ cp server/.env.example server/.env
vi server/.env
```
#### Network & Endpoint Switches
| Env Variable | Feature Description |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `REACT_APP_OCEAN_NETWORK` | This env var is a shortcut for a predefined set of Ocean network component endpoints. Possible values are `pacific`, `nile`, `duero`, `spree` |
This shortcut provides a unified place to switch a combination of Ocean component endpoints. This shortcut can also be triggered by using a `network` URL query parameter, e.g. `?network=nile`.
For more control, you can overwrite individual endpoints in addition to the above network selection:
- `REACT_APP_NODE_URI`
- `REACT_APP_AQUARIUS_URI`
- `REACT_APP_BRIZO_URI`
- `REACT_APP_BRIZO_ADDRESS`
- `REACT_APP_SECRET_STORE_URI`
- `REACT_APP_FAUCET_URI`
#### Feature Switches
Beside configuring the network endpopints, the client allows to activate some features with environment variables in `client/.env.local`:

View File

@ -3,16 +3,41 @@
# Commons will default connecting to Pacific
#
#
# AUTO NETWORK CONNECTIONS
# ------------------------
# This env var is a shortcut for a set Ocean network component endpoints.
#
# Possible values: pacific, nile, duero, spree
REACT_APP_OCEAN_NETWORK=pacific
#
# APP CONFIG
#
REACT_APP_REPORT_EMAIL="test@example.com"
# REACT_APP_SHOW_CHANNELS=true
# REACT_APP_ALLOW_PRICING=true
# REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true
REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"
REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443"
#
# MANUAL CONNECTIONS
# ------------------
# Use any of the following env variables to overwrite
# individudal endpoints.
#
# Connect to Pacific
#
REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
# REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
# REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
# REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
# Pacific Test instances
REACT_APP_AQUARIUS_URI="https://aquarius.test.oceanprotocol.com"
REACT_APP_BRIZO_URI="https://brizo.test.oceanprotocol.com"
REACT_APP_BRIZO_ADDRESS="0x0474ed05ba757dde575dfaaaa267d9e7f3643abc"
# REACT_APP_AQUARIUS_URI="https://aquarius.test.oceanprotocol.com"
# REACT_APP_BRIZO_URI="https://brizo.test.oceanprotocol.com"
# REACT_APP_BRIZO_ADDRESS="0x0474ed05ba757dde575dfaaaa267d9e7f3643abc"
# Pacific Commons instances
# REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
# REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
@ -51,13 +76,3 @@ REACT_APP_BRIZO_ADDRESS="0x0474ed05ba757dde575dfaaaa267d9e7f3643abc"
# REACT_APP_SECRET_STORE_URI="http://localhost:12001"
# REACT_APP_FAUCET_URI="http://localhost:3001"
# REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0"
#
# APP CONFIG
#
REACT_APP_REPORT_EMAIL="test@example.com"
# REACT_APP_SHOW_CHANNELS=true
# REACT_APP_ALLOW_PRICING=true
# REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true
REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"
REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443"