-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
182 lines (170 loc) · 4.52 KB
/
docker-compose.dev.yaml
File metadata and controls
182 lines (170 loc) · 4.52 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Base configurations that are common between environments
x-atoma-proxy-base: &atoma-proxy-base
build: &atoma-proxy-base-build
context: .
dockerfile: Dockerfile
volumes:
- ${CONFIG_PATH:-./config.toml}:/app/config.toml
- ./open_router.json:/app/open_router.json
- ./logs:/app/logs
- sui-config-volume:/root/.sui/sui_config
- ${SUI_CONFIG_PATH:-~/.sui/sui_config}:/tmp/.sui/sui_config
- ./data:/app/data
env_file:
- .env
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- RUST_LOG=${ATOMA_LOG_LEVELS:-info}
depends_on:
db:
condition: service_healthy
networks:
- atoma-network
services:
db:
profiles: ["local", "cloud"]
image: postgres:13
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- atoma-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} -p 5432 || exit 1"]
interval: 5s
timeout: 5s
retries: 5
# Local proxy configuration
atoma-proxy-local:
profiles: ["local"]
<<: *atoma-proxy-base
image: ghcr.io/atoma-network/atoma-proxy:local-latest
build:
<<: *atoma-proxy-base-build
args:
PROFILE: local
ports:
- "${ATOMA_SERVICE_PORT:-8080}:8080"
- "${ATOMA_PROXY_SERVICE_PORT:-8081}:8081"
- "${ATOMA_P2P_SERVICE_PORT:-8083}:8083"
# Cloud proxy configuration
atoma-proxy-cloud:
profiles: ["cloud"]
<<: *atoma-proxy-base
image: ghcr.io/atoma-network/atoma-proxy:latest
build:
<<: *atoma-proxy-base-build
args:
PROFILE: cloud
ports:
- "${ATOMA_P2P_PORT:-8083}:8083/udp"
- "${ATOMA_P2P_PORT:-8083}:8083/tcp"
- "${ATOMA_PROXY_SERVICE_PORT:-8081}:8081/tcp"
- "${ATOMA_SERVICE_PORT:-8080}:8080/tcp"
backend:
profiles: ["cloud"]
image: mysten/zklogin:prover-stable
volumes:
# The ZKEY environment variable must be set to the path of the zkey file.
- ${ZKEY}:/app/binaries/zkLogin.zkey
environment:
- ZKEY=/app/binaries/zkLogin.zkey
- WITNESS_BINARIES=/app/binaries
networks:
- atoma-network
frontend:
profiles: ["cloud"]
image: mysten/zklogin:prover-fe-stable
command: "8080"
environment:
- PROVER_URI=http://backend:8080/input
- NODE_ENV=production
- DEBUG=zkLogin:info,jwks
networks:
- atoma-network
otel-collector:
image: otel/opentelemetry-collector-contrib:0.119.0
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP http receiver
- "8889:8889" # Prometheus metrics exporter
networks:
- atoma-network
depends_on:
- prometheus
- grafana
- loki
- tempo
prometheus:
image: prom/prometheus:v3.1.0
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
networks:
- atoma-network
grafana:
image: grafana/grafana:11.5.1
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
env_file: .env
environment:
- GF_SERVER_ROOT_URL=http://${GRAFANA_DOMAIN}:${GRAFANA_PORT:-3000}/
networks:
- atoma-network
depends_on:
- prometheus
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
loki:
image: grafana/loki:2.9.4
ports:
- "3100:3100"
command: -config.file=/etc/loki/loki.yaml
volumes:
- ./loki.yaml:/etc/loki/loki.yaml
- loki-data:/loki
networks:
- atoma-network
tempo:
image: grafana/tempo:2.7.0
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- tempo-data:/tmp/tempo
ports:
- "3200:3200"
networks:
- atoma-network
user: "0"
volumes:
postgres-data:
sui-config-volume:
letsencrypt:
grafana_data:
prometheus-data:
loki-data:
tempo-data:
atoma-local-key:
networks:
atoma-network:
driver: bridge