-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathdocker-compose.archive.devnet.yml
More file actions
74 lines (70 loc) · 2.17 KB
/
docker-compose.archive.devnet.yml
File metadata and controls
74 lines (70 loc) · 2.17 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:
postgres-mina-rust:
image: postgres
container_name: postgres-mina-rust
env_file:
- .env
healthcheck:
# test: ["CMD-SHELL", "psql -U postgres -d archive -tAc \"SELECT COUNT(*) FROM pg_database WHERE datname='archive';\" | grep -q '^1$'"]
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 10
volumes:
- /tmp/archive-data-mina:/var/lib/postgresql/data
# ports:
# - "127.0.0.1:${PG_PORT}:${PG_PORT}"
create-db:
image: postgres
container_name: create-dbs
env_file:
- .env
command: >
bash -c '
sleep 10;
psql postgres://postgres:${POSTGRES_PASSWORD}@postgres-mina-rust:${PG_PORT} -c "CREATE DATABASE ${PG_DB};";
psql postgres://postgres:${POSTGRES_PASSWORD}@postgres-mina-rust:${PG_PORT}/${PG_DB} -c "
ALTER SYSTEM SET max_connections = 500;
ALTER SYSTEM SET max_locks_per_transaction = 100;
ALTER SYSTEM SET max_pred_locks_per_relation = 100;
ALTER SYSTEM SET max_pred_locks_per_transaction = 5000;
";
psql postgres://postgres:${POSTGRES_PASSWORD}@postgres-mina-rust:${PG_PORT}/${PG_DB} -f /sql/archive_schema.sql;
'
volumes:
- ./sql/archive:/sql
depends_on:
postgres-mina-rust:
condition: service_healthy
archive-mina-rust:
image: adrnagy/mina-archive
container_name: archive-mina-rust
env_file:
- .env
volumes:
- /tmp/archive-outputs/mina:/data
entrypoint: ["mina-archive"]
command: >
run
--postgres-uri postgres://postgres:${POSTGRES_PASSWORD}@postgres-mina-rust:${PG_PORT}/${PG_DB}
--server-port 3086
--log-level debug
--output-dir /data
depends_on:
postgres-mina-rust:
condition: service_healthy
ports:
- "127.0.0.1:3086:3086"
mina-rust-node:
image: o1labs/mina-rust:${MINA_RUST_TAG:-latest}
container_name: mina-rust-node
environment:
- MINA_ARCHIVE_ADDRESS=http://archive-mina-rust:3086
command: >
node
--archive-archiver-process
ports:
- "127.0.0.1:3000:3000"
depends_on:
archive-mina-rust:
condition: service_started