-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
131 lines (127 loc) · 4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
131 lines (127 loc) · 4 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
130
131
services:
# Ethereum Mainnet Tycho API
tycho-api-ethereum:
build:
context: .
dockerfile: api/Dockerfile
image: tycho-explorer/api:latest
container_name: tycho-api-ethereum
deploy:
resources:
limits:
memory: 4G
ports:
- "3001:3000"
environment:
TYCHO_API_KEY: ${TYCHO_API_KEY}
RUST_LOG: ${RUST_LOG:-info}
RPC_URL: ${RPC_URL}
command: ["/usr/local/bin/tycho-api", "--tvl-threshold", "${TVL_THRESHOLD}", "--chain", "ethereum", "--port", "3000", "--tycho-url", "${TYCHO_ETHEREUM_URL}"]
networks:
- tycho-network
healthcheck:
test: ["CMD", "bash", "-c", "curl -f http://localhost:3000/ || (echo '🔴 [HEALTH] Ethereum API health check failed' && exit 1)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
labels:
- "com.swift.service=tycho-api"
- "com.swift.chain=ethereum"
# Base Mainnet Tycho API
# All services use the SAME image
tycho-api-base:
image: tycho-explorer/api:latest
container_name: tycho-api-base
deploy:
resources:
limits:
memory: 4G
ports:
- "3002:3000"
environment:
TYCHO_API_KEY: ${TYCHO_API_KEY}
RUST_LOG: ${RUST_LOG:-info}
RPC_URL: ${RPC_URL}
command: ["/usr/local/bin/tycho-api", "--tvl-threshold", "${TVL_THRESHOLD}", "--chain", "base", "--port", "3000", "--tycho-url", "${TYCHO_BASE_URL}"]
networks:
- tycho-network
healthcheck:
test: ["CMD", "bash", "-c", "curl -f http://localhost:3000/ || (echo '🔴 [HEALTH] Base API health check failed' && exit 1)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
labels:
- "com.swift.service=tycho-api"
- "com.swift.chain=base"
# Unichain Mainnet Tycho API
# All services use the SAME image
tycho-api-unichain:
image: tycho-explorer/api:latest
container_name: tycho-api-unichain
deploy:
resources:
limits:
memory: 4G
ports:
- "3003:3000"
environment:
TYCHO_API_KEY: ${TYCHO_API_KEY}
RUST_LOG: ${RUST_LOG:-info}
RPC_URL: ${RPC_URL}
command: ["/usr/local/bin/tycho-api", "--tvl-threshold", "${TVL_THRESHOLD}", "--chain", "unichain", "--port", "3000", "--tycho-url", "${TYCHO_UNICHAIN_URL}"]
networks:
- tycho-network
healthcheck:
test: ["CMD", "bash", "-c", "curl -f http://localhost:3000/ || (echo '🔴 [HEALTH] Unichain API health check failed' && exit 1)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
labels:
- "com.swift.service=tycho-api"
- "com.swift.chain=unichain"
# Frontend Application
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- BUILDKIT_PROGRESS=plain
- VITE_WEBSOCKET_URL_ETHEREUM=${VITE_WEBSOCKET_URL_ETHEREUM}
- VITE_WEBSOCKET_URL_BASE=${VITE_WEBSOCKET_URL_BASE}
- VITE_WEBSOCKET_URL_UNICHAIN=${VITE_WEBSOCKET_URL_UNICHAIN}
- VITE_API_ETHEREUM_URL=${VITE_API_ETHEREUM_URL}
- VITE_API_BASE_URL=${VITE_API_BASE_URL}
- VITE_API_UNICHAIN_URL=${VITE_API_UNICHAIN_URL}
container_name: tycho-explorer-frontend
deploy:
resources:
limits:
memory: 2G
ports:
- "8080:80"
depends_on:
tycho-api-ethereum:
condition: service_healthy
tycho-api-base:
condition: service_healthy
tycho-api-unichain:
condition: service_healthy
environment:
VITE_WEBSOCKET_URL_ETHEREUM: ${VITE_WEBSOCKET_URL_ETHEREUM}
VITE_WEBSOCKET_URL_BASE: ${VITE_WEBSOCKET_URL_BASE}
VITE_WEBSOCKET_URL_UNICHAIN: ${VITE_WEBSOCKET_URL_UNICHAIN}
VITE_API_ETHEREUM_URL: ${VITE_API_ETHEREUM_URL}
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
VITE_API_UNICHAIN_URL: ${VITE_API_UNICHAIN_URL}
networks:
- tycho-network
labels:
- "com.swift.service=frontend"
networks:
tycho-network:
driver: bridge
driver_opts:
com.docker.network.debug: "true"