From f549ef7d393ca748d2f3fbf78ebad9e55c4c1050 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 24 Nov 2022 21:12:50 +0300 Subject: [PATCH] [#241] http: Provide common params with `.yml` file Signed-off-by: Pavel Karpy --- services/http_gate/.http.env | 9 --------- services/http_gate/cfg/config.yml | 20 ++++++++++++++++++++ services/http_gate/docker-compose.yml | 4 ++-- 3 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 services/http_gate/cfg/config.yml diff --git a/services/http_gate/.http.env b/services/http_gate/.http.env index efef237..e69de29 100644 --- a/services/http_gate/.http.env +++ b/services/http_gate/.http.env @@ -1,9 +0,0 @@ -HTTP_GW_SERVER_0_ADDRESS=0.0.0.0:80 - -HTTP_GW_LOGGER_LEVEL=info - -HTTP_GW_REBALANCE_TIMER=5m -HTTP_GW_CONNECT_TIMEOUT=60s -HTTP_GW_REQUEST_TIMEOUT=300s - -HTTP_GW_RESOLVE_ORDER=nns diff --git a/services/http_gate/cfg/config.yml b/services/http_gate/cfg/config.yml new file mode 100644 index 0000000..7cfdd40 --- /dev/null +++ b/services/http_gate/cfg/config.yml @@ -0,0 +1,20 @@ +logger: + level: debug + +rebalance_timer: 5m # Interval to check nodes health + +connect_timeout: 60s # Timeout to dial node + +request_timeout: 300s # Timeout to check node health during rebalance + +# The order in which resolvers are used to find an container id by name +resolve_order: + - nns + +server: + - address: 0.0.0.0:80 + +# Wallet settings +wallet: + path: /wallet.json # Path to wallet + passphrase: one # Passphrase to decrypt wallet diff --git a/services/http_gate/docker-compose.yml b/services/http_gate/docker-compose.yml index d7f9c76..0dd3ad5 100644 --- a/services/http_gate/docker-compose.yml +++ b/services/http_gate/docker-compose.yml @@ -15,11 +15,11 @@ services: volumes: - ./wallet.json:/wallet.json - ./../../vendor/hosts:/etc/hosts + - ./cfg:/etc/frostfs/http stop_signal: SIGKILL env_file: [ ".env", ".http.env", ".int_test.env" ] + command: [ "frostfs-http-gw", "--config", "/etc/frostfs/http/config.yml" ] environment: - - HTTP_GW_WALLET_PATH=/wallet.json - - HTTP_GW_WALLET_PASSPHRASE=one - HTTP_GW_RPC_ENDPOINT=http://morph-chain.${LOCAL_DOMAIN}:30333 - HTTP_GW_PEERS_0_ADDRESS=s01.${LOCAL_DOMAIN}:8080 - HTTP_GW_PEERS_0_WEIGHT=0.2