diff --git a/.env b/.env index b1ddbe8..6192ee4 100644 --- a/.env +++ b/.env @@ -16,3 +16,7 @@ IR_IMAGE=nspccdev/neofs-ir # NeoFS Storage nodes NODE_VERSION=0.12.1 NODE_IMAGE=nspccdev/neofs-storage + +# HTTP Gate +HTTP_GW_VERSION=0.12.0-rc.3 +HTTP_GW_IMAGE=nspccdev/neofs-http-gate diff --git a/.services b/.services index b9134b7..1fc4e3f 100644 --- a/.services +++ b/.services @@ -5,3 +5,4 @@ chain morph_chain ir storage +http_gate diff --git a/services/http_gate/.env b/services/http_gate/.env new file mode 120000 index 0000000..c7360fb --- /dev/null +++ b/services/http_gate/.env @@ -0,0 +1 @@ +../../.env \ No newline at end of file diff --git a/services/http_gate/.hosts b/services/http_gate/.hosts new file mode 100644 index 0000000..9ab5251 --- /dev/null +++ b/services/http_gate/.hosts @@ -0,0 +1 @@ +IPV4_PREFIX.81 http.LOCAL_DOMAIN diff --git a/services/http_gate/.http.env b/services/http_gate/.http.env new file mode 100644 index 0000000..138b43e --- /dev/null +++ b/services/http_gate/.http.env @@ -0,0 +1,15 @@ +HTTP_GW_LISTEN_ADDRESS=0.0.0.0:8080 + +HTTP_GW_LOGGER_LEVEL=info + +HTTP_GW_REBALANCE_TIMER=5m +HTTP_GW_CONNECT_TIMEOUT=60s +HTTP_GW_REQUEST_TIMEOUT=300s + +HTTP_GW_KEEPALIVE_TIMEOUT=300s +HTTP_GW_KEEPALIVE_TIME=120s +HTTP_GW_KEEPALIVE_PERMIT_WITHOUT_STREAM=True + +HTTP_GW_METRICS=False +HTTP_GW_PPROF=False +HTTP_GW_VERBOSE=false diff --git a/services/http_gate/docker-compose.yml b/services/http_gate/docker-compose.yml new file mode 100644 index 0000000..29abf83 --- /dev/null +++ b/services/http_gate/docker-compose.yml @@ -0,0 +1,35 @@ +--- + +version: "2.4" +services: + http_gate: + image: ${HTTP_GW_IMAGE}:${HTTP_GW_VERSION} + domainname: ${LOCAL_DOMAIN} + hostname: http_gate + container_name: http_gate + restart: on-failure + networks: + http_gate_int: + internet: + ipv4_address: ${IPV4_PREFIX}.81 + volumes: + - ./user.key:/user.key + - ./../../vendor/hosts:/etc/hosts + stop_signal: SIGKILL + env_file: [ ".env", ".http.env" ] + environment: + - HTTP_GW_KEY=/user.key + - HTTP_GW_PEERS_0_ADDRESS=s01.${LOCAL_DOMAIN}:8080 + - HTTP_GW_PEERS_0_WEIGHT=0.2 + - HTTP_GW_PEERS_1_ADDRESS=s02.${LOCAL_DOMAIN}:8080 + - HTTP_GW_PEERS_1_WEIGHT=0.2 + - HTTP_GW_PEERS_2_ADDRESS=s03.${LOCAL_DOMAIN}:8080 + - HTTP_GW_PEERS_2_WEIGHT=0.2 + - HTTP_GW_PEERS_3_ADDRESS=s04.${LOCAL_DOMAIN}:8080 + - HTTP_GW_PEERS_3_WEIGHT=0.2 + +networks: + http_gate_int: + internet: + external: + name: basenet_internet diff --git a/services/http_gate/user.key b/services/http_gate/user.key new file mode 100644 index 0000000..ba2021b --- /dev/null +++ b/services/http_gate/user.key @@ -0,0 +1 @@ +?ܳv/l \ No newline at end of file