Skip to content

Commit

Permalink
fix: Ensure env var references can be passed via include direction …
Browse files Browse the repository at this point in the history
…of Docker Compose (#380)

Fix envar references

This allows us to pass them via environment variables.
  • Loading branch information
sds authored Aug 28, 2023
1 parent 3676115 commit 2c6db9b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -70,18 +73,21 @@ 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:
- l1-anvil-data:/var/lib/anvil
- l1-anvil-cache:/root/.foundry/cache
ports:
- '${PORT:-8546}:${PORT:-8545}'

l1-deployer:
<<: *deployer-defaults
depends_on:
Expand Down

0 comments on commit 2c6db9b

Please sign in to comment.