mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-26 00:25:17 +00:00
add env var based default addresses for RPC endpoints (#49)
* add env var based default addresses for RPC endpoints * set default addresses for gRPC and REST
This commit is contained in:
parent
2b232a8e2f
commit
c96a3b7538
@ -7,6 +7,9 @@ services:
|
|||||||
build: ./
|
build: ./
|
||||||
image: quilibrium
|
image: quilibrium
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
- DEFAULT_LISTEN_GRPC_MULTIADDR=/ip4/0.0.0.0/tcp/8337
|
||||||
|
- DEFAULT_LISTEN_REST_MULTIADDR=/ip4/0.0.0.0/tcp/8338
|
||||||
ports:
|
ports:
|
||||||
- '8336:8336/udp' # p2p
|
- '8336:8336/udp' # p2p
|
||||||
- '127.0.0.1:8337:8337/tcp' # gRPC
|
- '127.0.0.1:8337:8337/tcp' # gRPC
|
||||||
|
@ -137,6 +137,11 @@ func LoadConfig(configPath string, proverKey string) (*Config, error) {
|
|||||||
|
|
||||||
config.Key.KeyStoreFile.EncryptionKey = hex.EncodeToString(keystoreKey)
|
config.Key.KeyStoreFile.EncryptionKey = hex.EncodeToString(keystoreKey)
|
||||||
|
|
||||||
|
if multiAddr := os.Getenv("DEFAULT_LISTEN_GRPC_MULTIADDR"); multiAddr != "" {
|
||||||
|
config.ListenGRPCMultiaddr = multiAddr
|
||||||
|
config.ListenRestMultiaddr = os.Getenv("DEFAULT_LISTEN_REST_MULTIADDR")
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("Saving config...")
|
fmt.Println("Saving config...")
|
||||||
if err = SaveConfig(configPath, config); err != nil {
|
if err = SaveConfig(configPath, config); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user