-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (70 loc) · 2.51 KB
/
docker-compose.yml
File metadata and controls
74 lines (70 loc) · 2.51 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
x-balances-watcher: &balances-watcher
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-fsS", "http://localhost:8080/health" ]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
services:
traefik:
image: traefik:v2.11
container_name: traefik
depends_on:
balances-watcher-eth:
condition: service_healthy
balances-watcher-arb:
condition: service_healthy
balances-watcher-sepolia:
condition: service_healthy
ports:
- "4000:80"
- "8081:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
balances-watcher-eth:
<<: *balances-watcher
environment:
- NETWORK=1
- RPC_HTTP_URL=${ETH_RPC_HTTP_URL:-https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}}
- RPC_WS_URL=${ETH_RPC_WS_URL:-wss://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}}
- RUST_LOG=${RUST_LOG:-info}
labels:
- "traefik.enable=true"
- "traefik.http.routers.eth.rule=PathPrefix(`/1/`) || PathPrefix(`/sse/1/`)"
- "traefik.http.routers.eth.entrypoints=web"
- "traefik.http.services.eth.loadbalancer.server.port=8080"
balances-watcher-arb:
<<: *balances-watcher
environment:
- NETWORK=42161
- RPC_HTTP_URL=${ARB_RPC_HTTP_URL:-https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}}
- RPC_WS_URL=${ARB_RPC_WS_URL:-wss://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}}
- RUST_LOG=${RUST_LOG:-info}
labels:
- "traefik.enable=true"
- "traefik.http.routers.arb.rule=PathPrefix(`/42161/`) || PathPrefix(`/sse/42161/`)"
- "traefik.http.routers.arb.entrypoints=web"
- "traefik.http.services.arb.loadbalancer.server.port=8080"
balances-watcher-sepolia:
<<: *balances-watcher
environment:
- NETWORK=11155111
- RPC_HTTP_URL=${SEPOLIA_RPC_HTTP_URL:-https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}}
- RPC_WS_URL=${SEPOLIA_RPC_WS_URL:-wss://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}}
- RUST_LOG=${RUST_LOG:-info}
labels:
- "traefik.enable=true"
- "traefik.http.routers.sepolia.rule=PathPrefix(`/11155111/`) || PathPrefix(`/sse/11155111/`)"
- "traefik.http.routers.sepolia.entrypoints=web"
- "traefik.http.services.sepolia.loadbalancer.server.port=8080"