From 2c6db9b8b98dcd02c154c5e83bdf409c4f3a5261 Mon Sep 17 00:00:00 2001 From: Shane da Silva Date: Mon, 28 Aug 2023 14:35:37 -0700 Subject: [PATCH] fix: Ensure env var references can be passed via `include` direction of Docker Compose (#380) Fix envar references This allows us to pass them via environment variables. --- docker-compose.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ff23c7be..63ea38ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,10 @@ x-deployer-defaults: &deployer-defaults services: l2-anvil: <<: *anvil-defaults - command: ['anvil', '--host', '0.0.0.0', '--port', '${PORT:-8545}', '--rpc-url', '$L2_MAINNET_RPC_URL', '--state', '/var/lib/anvil/state', '--retries', '3', '--timeout', '10000'] + command: | + sh -c ' + exec anvil --host 0.0.0.0 --port ${PORT:-8545} --rpc-url $$L2_MAINNET_RPC_URL --state /var/lib/anvil/state --retries 3 --timeout 10000 + ' environment: - L2_MAINNET_RPC_URL volumes: @@ -70,10 +73,13 @@ services: cast rpc anvil_autoImpersonateAccount false --rpc-url "$$RPC_URL" > /dev/null echo "Deploy complete" ' - + l1-anvil: <<: *anvil-defaults - command: ['anvil', '--host', '0.0.0.0', '--port', '${PORT:-8545}', '--rpc-url', '$L1_MAINNET_RPC_URL', '--state', '/var/lib/anvil/state', '--retries', '3', '--timeout', '10000'] + command: | + sh -c ' + exec anvil --host 0.0.0.0 --port ${PORT:-8545} --rpc-url $$L1_MAINNET_RPC_URL --state /var/lib/anvil/state --retries 3 --timeout 10000 + ' environment: - L1_MAINNET_RPC_URL volumes: @@ -81,7 +87,7 @@ services: - l1-anvil-cache:/root/.foundry/cache ports: - '${PORT:-8546}:${PORT:-8545}' - + l1-deployer: <<: *deployer-defaults depends_on: