-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (119 loc) · 3.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
129 lines (119 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
services:
anvil-l1:
image: ametelnethermind/aggsandbox-anvil:latest
ports:
- "8545:8545"
networks:
- anvil-network
environment:
- ENABLE_FORK_MODE=${ENABLE_FORK_MODE:-false}
- FORK_URL_MAINNET=${FORK_URL_MAINNET:-}
- CHAIN_ID_MAINNET=${CHAIN_ID_MAINNET:-1}
healthcheck:
test: ["CMD-SHELL", "timeout 1 bash -c '</dev/tcp/localhost/8545'"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
anvil-l2:
image: ametelnethermind/aggsandbox-anvil:latest
ports:
- "8546:8545"
networks:
- anvil-network
environment:
- ENABLE_FORK_MODE=${ENABLE_FORK_MODE:-false}
- FORK_URL_AGGLAYER_1=${FORK_URL_AGGLAYER_1:-}
- CHAIN_ID_AGGLAYER_1=${CHAIN_ID_AGGLAYER_1:-1101}
healthcheck:
test: ["CMD-SHELL", "timeout 1 bash -c '</dev/tcp/localhost/8545'"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
contract-deployer:
image: ametelnethermind/aggsandbox-deployer:latest
pull_policy: always
depends_on:
anvil-l1:
condition: service_healthy
anvil-l2:
condition: service_healthy
networks:
- anvil-network
environment:
- RPC_URL_1=http://anvil-l1:8545
- RPC_URL_2=http://anvil-l2:8545
volumes:
- ./.env:/app/output/deployed-contracts.env
aggkit-wait:
image: alpine:latest
pull_policy: missing
depends_on:
contract-deployer:
condition: service_completed_successfully
networks:
- anvil-network
command:
- sh
- -c
- |
echo 'Waiting for contracts to be deployed...'
for i in $$(seq 1 30); do
if [ -f '/app/output/deployed-contracts.env' ]; then
echo "Contract deployment file found, checking content..."
if grep -q "POLYGON_ROLLUP_MANAGER_L1=" /app/output/deployed-contracts.env; then
echo "Contract addresses found in deployment file"
exit 0
fi
fi
echo "Attempt $$i/30: Contract not ready, waiting..."
sleep 5
done
echo 'Contract verification failed after 150s'
exit 1
volumes:
- ./.env:/app/output/deployed-contracts.env:ro
aggkit:
image: ametelnethermind/aggkit:latest
pull_policy: always
depends_on:
contract-deployer:
condition: service_completed_successfully
aggkit-wait:
condition: service_completed_successfully
ports:
- "5577:5577" # REST API
- "8080:8080" # Telemetry
- "8555:8555" # RPC
networks:
- anvil-network
volumes:
- ./config:/app/config
- aggkit-data:/app/data
- ./.env:/app/.env:ro # Mount .env file directly so it can be read at runtime
environment:
# Basic configuration
- AGGKIT_SANDBOX_ENABLED=true
- AGGKIT_LOG_LEVEL=info
- AGGKIT_COMPONENTS=bridge,aggoracle,claim-sponsor
- AGGKIT_CLAIMSPONSOR_ENABLED=true
- AGGKIT_CLAIMSPONSOR_CLAIM_ALL=${AGGKIT_CLAIMSPONSOR_CLAIM_ALL:-false}
# Network configuration
- AGGKIT_L1_URL=http://anvil-l1:8545
- AGGKIT_L2_URL=http://anvil-l2:8545
- AGGKIT_L1_CHAIN_ID=1
- AGGKIT_L2_CHAIN_ID=1101
# Service ports
- AGGKIT_REST_PORT=5577
- AGGKIT_RPC_PORT=8555
- AGGKIT_TELEMETRY_PORT=8080
# Database
- AGGKIT_DATABASE_NAME=/app/data/aggkit.db
# Tell the entrypoint script to read from mounted .env file
- AGGKIT_ENV_FILE=/app/.env
networks:
anvil-network:
driver: bridge
volumes:
aggkit-data: