-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (71 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
74 lines (71 loc) · 2.15 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
services:
hierophant:
image: ${HIEROPHANT_IMAGE:-unattended/hierophant:latest}
container_name: hierophant
networks:
- network
ports:
- "9000:9000" # gRPC
- "9010:9010" # HTTP + WebSocket
volumes:
- ./hierophant.toml:/home/hierophant/hierophant.toml:ro
env_file:
- .env
environment:
- RUST_LOG=info
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/9010 && echo -e 'GET /health HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && timeout 1 cat <&3 | head -n 1 | grep -q '200 OK'"]
interval: 2s
timeout: 2s
retries: 30
start_period: 5s
magister:
image: ${MAGISTER_IMAGE:-unattended/magister:latest}
container_name: magister
networks:
- network
ports:
- "8555:8555"
volumes:
- ./magister.toml:/home/magister/magister.toml:ro
env_file:
- .env
environment:
- RUST_LOG=info
depends_on:
hierophant:
condition: service_healthy
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/8555 && echo -e 'GET /summary HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && timeout 1 cat <&3 | head -n 1 | grep -q '200 OK'"]
interval: 2s
timeout: 2s
retries: 10
start_period: 10s
fibonacci:
build:
context: ./src/fibonacci
dockerfile: Dockerfile
container_name: fibonacci
networks:
- network
depends_on:
hierophant:
condition: service_healthy
magister:
condition: service_healthy
environment:
- RUST_LOG=info
command:
- bash
- -c
- |
echo "Waiting for at least one idle Contemplant..."
while ! (exec 3<>/dev/tcp/hierophant/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: hierophant\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
echo "No idle Contemplants available yet, waiting..."
sleep 5
done
echo "Idle Contemplant found, starting fibonacci proof..."
cargo run --release --bin evm -- --n 10 --system plonk
networks:
network:
driver: bridge