forked from TrueCloudLab/frostfs-node
[#935] config/example: quote spaces in node.env
``` > source config/example/node.env config/example/node.env: строка 14: /dns4/s02.neofs.devenv/tcp/8081: Нет такого файла или каталога config/example/node.env: строка 16: MSK: команда не найдена config/example/node.env: строка 35: 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6: команда не найдена config/example/node.env: строка 48: https://rpc2.morph.fs.neo.org:40341: Нет такого файла или каталога config/example/node.env: строка 49: wss://rpc2.morph.fs.neo.org:40341/ws: Нет такого файла или каталога config/example/node.env: строка 53: https://rpc2.n3.nspcc.ru:30341: Нет такого файла или каталога ``` New implementation is still basic, but we don't need to parse any env file, just have a correct example. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
208d150500
commit
41a9261069
2 changed files with 9 additions and 7 deletions
|
@ -65,11 +65,13 @@ func loadEnv(path string) {
|
||||||
|
|
||||||
scanner := bufio.NewScanner(f)
|
scanner := bufio.NewScanner(f)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
pair := strings.Split(scanner.Text(), "=")
|
pair := strings.SplitN(scanner.Text(), "=", 2)
|
||||||
if len(pair) != 2 {
|
if len(pair) != 2 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pair[1] = strings.Trim(pair[1], `"`)
|
||||||
|
|
||||||
err = os.Setenv(pair[0], pair[1])
|
err = os.Setenv(pair[0], pair[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("can't set environment variable")
|
panic("can't set environment variable")
|
||||||
|
|
|
@ -11,9 +11,9 @@ NEOFS_NODE_KEY=./wallet.key
|
||||||
NEOFS_NODE_WALLET_PATH=./wallet.json
|
NEOFS_NODE_WALLET_PATH=./wallet.json
|
||||||
NEOFS_NODE_WALLET_ADDRESS=NcpJzXcSDrh5CCizf4K9Ro6w4t59J5LKzz
|
NEOFS_NODE_WALLET_ADDRESS=NcpJzXcSDrh5CCizf4K9Ro6w4t59J5LKzz
|
||||||
NEOFS_NODE_WALLET_PASSWORD=password
|
NEOFS_NODE_WALLET_PASSWORD=password
|
||||||
NEOFS_NODE_ADDRESSES=s01.neofs.devenv:8080 /dns4/s02.neofs.devenv/tcp/8081 grpc://127.0.0.1:8082 grpcs://localhost:8083
|
NEOFS_NODE_ADDRESSES="s01.neofs.devenv:8080 /dns4/s02.neofs.devenv/tcp/8081 grpc://127.0.0.1:8082 grpcs://localhost:8083"
|
||||||
NEOFS_NODE_ATTRIBUTE_0=Price:11
|
NEOFS_NODE_ATTRIBUTE_0=Price:11
|
||||||
NEOFS_NODE_ATTRIBUTE_1=UN-LOCODE:RU MSK
|
NEOFS_NODE_ATTRIBUTE_1="UN-LOCODE:RU MSK"
|
||||||
NEOFS_NODE_RELAY=true
|
NEOFS_NODE_RELAY=true
|
||||||
NEOFS_NODE_PERSISTENT_STATE_PATH=/state
|
NEOFS_NODE_PERSISTENT_STATE_PATH=/state
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ NEOFS_GRPC_1_ENDPOINT=s02.neofs.devenv:8080
|
||||||
NEOFS_GRPC_1_TLS_ENABLED=false
|
NEOFS_GRPC_1_TLS_ENABLED=false
|
||||||
|
|
||||||
# Control service section
|
# Control service section
|
||||||
NEOFS_CONTROL_AUTHORIZED_KEYS=035839e45d472a3b7769a2a1bd7d54c4ccd4943c3b40f547870e83a8fcbfb3ce11 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6
|
NEOFS_CONTROL_AUTHORIZED_KEYS="035839e45d472a3b7769a2a1bd7d54c4ccd4943c3b40f547870e83a8fcbfb3ce11 028f42cfcb74499d7b15b35d9bff260a1c8d27de4f446a627406a382d8961486d6"
|
||||||
NEOFS_CONTROL_GRPC_ENDPOINT=127.0.0.1:8090
|
NEOFS_CONTROL_GRPC_ENDPOINT=127.0.0.1:8090
|
||||||
|
|
||||||
# Contracts section
|
# Contracts section
|
||||||
|
@ -45,12 +45,12 @@ NEOFS_CONTRACTS_PROXY=ad7c6b55b737b696e5c82c85445040964a03e97f
|
||||||
# Morph chain section
|
# Morph chain section
|
||||||
NEOFS_MORPH_DIAL_TIMEOUT=30s
|
NEOFS_MORPH_DIAL_TIMEOUT=30s
|
||||||
NEOFS_MORPH_DISABLE_CACHE=true
|
NEOFS_MORPH_DISABLE_CACHE=true
|
||||||
NEOFS_MORPH_RPC_ENDPOINT=https://rpc1.morph.fs.neo.org:40341 https://rpc2.morph.fs.neo.org:40341
|
NEOFS_MORPH_RPC_ENDPOINT="https://rpc1.morph.fs.neo.org:40341 https://rpc2.morph.fs.neo.org:40341"
|
||||||
NEOFS_MORPH_NOTIFICATION_ENDPOINT=wss://rpc1.morph.fs.neo.org:40341/ws wss://rpc2.morph.fs.neo.org:40341/ws
|
NEOFS_MORPH_NOTIFICATION_ENDPOINT="wss://rpc1.morph.fs.neo.org:40341/ws wss://rpc2.morph.fs.neo.org:40341/ws"
|
||||||
|
|
||||||
# Main chain section (optional)
|
# Main chain section (optional)
|
||||||
NEOFS_MAINCHAIN_DIAL_TIMEOUT=30s
|
NEOFS_MAINCHAIN_DIAL_TIMEOUT=30s
|
||||||
NEOFS_MAINCHAIN_RPC_ENDPOINT=https://rpc1.n3.nspcc.ru:30341 https://rpc2.n3.nspcc.ru:30341
|
NEOFS_MAINCHAIN_RPC_ENDPOINT="https://rpc1.n3.nspcc.ru:30341 https://rpc2.n3.nspcc.ru:30341"
|
||||||
|
|
||||||
# API Client section
|
# API Client section
|
||||||
NEOFS_APICLIENT_DIAL_TIMEOUT=15s
|
NEOFS_APICLIENT_DIAL_TIMEOUT=15s
|
||||||
|
|
Loading…
Reference in a new issue