From c646ca9eab2b022d810b1aa0f4aa1d5605e34a95 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 8 Sep 2022 22:24:27 +0000 Subject: [PATCH] use host networking --- bin/docker-compose-production | 2 ++ docker-compose.common.yml | 2 +- docker-compose.prod.yml | 51 ++++++++++++++++++++++++++++------- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/bin/docker-compose-production b/bin/docker-compose-production index 0ebe523b..991ba500 100755 --- a/bin/docker-compose-production +++ b/bin/docker-compose-production @@ -3,4 +3,6 @@ # change to the project's root directory cd "${0%/*}/.." +export DOCKER_BUILDKIT=1 + exec docker-compose -f docker-compose.prod.yml "$@" diff --git a/docker-compose.common.yml b/docker-compose.common.yml index 9799d260..8102aa3e 100644 --- a/docker-compose.common.yml +++ b/docker-compose.common.yml @@ -3,7 +3,7 @@ services: # TODO: build in dev but use docker hub in prod? build: . restart: unless-stopped - command: --config /config.toml --workers 32 + command: --config /config.toml --workers 16 environment: #RUST_LOG: "info,web3_proxy=debug" RUST_LOG: info diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 97248953..78382a49 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -21,7 +21,10 @@ services: adminer: image: adminer ports: - - 8306:8080 + - mode: host + protocol: tcp + published: 8306 + target: 8080 environment: ADMINER_DEFAULT_SERVER: db @@ -32,7 +35,10 @@ services: volumes: - ./config/production-arbitrum.toml:/config.toml ports: - - 7500:8544 + - mode: host + protocol: tcp + published: 7500 + target: 8544 # avalanche-c: # extends: @@ -41,7 +47,10 @@ services: # volumes: # - ./config/production-avalanche-c.toml:/config.toml # ports: - # - 7501:8544 + # - mode: host + # protocol: tcp + # published: 7501 + # target: 8544 bsc: extends: @@ -50,16 +59,23 @@ services: volumes: - ./config/production-bsc.toml:/config.toml ports: - - 7502:8544 + - mode: host + protocol: tcp + published: 7502 + target: 8544 eth: extends: file: docker-compose.common.yml service: base + command: --config /config.toml --workers 72 volumes: - ./config/production-eth.toml:/config.toml ports: - - 7503:8544 + - mode: host + protocol: tcp + published: 7503 + target: 8544 fantom: extends: @@ -68,7 +84,10 @@ services: volumes: - ./config/production-fantom.toml:/config.toml ports: - - 7504:8544 + - mode: host + protocol: tcp + published: 7504 + target: 8544 gnosis: extends: @@ -77,7 +96,10 @@ services: volumes: - ./config/production-gnosis.toml:/config.toml ports: - - 7505:8544 + - mode: host + protocol: tcp + published: 7505 + target: 8544 # goerli: # extends: @@ -86,7 +108,10 @@ services: # volumes: # - ./config/production-goerli.toml:/config.toml # ports: - # - 7506:8544 + # - mode: host + # protocol: tcp + # published: 7506 + # target: 8544 optimism: extends: @@ -95,7 +120,10 @@ services: volumes: - ./config/production-optimism.toml:/config.toml ports: - - 7507:8544 + - mode: host + protocol: tcp + published: 7507 + target: 8544 polygon: extends: @@ -104,4 +132,7 @@ services: volumes: - ./config/production-polygon.toml:/config.toml ports: - - 7508:8544 + - mode: host + protocol: tcp + published: 7508 + target: 8544