From f96af8e917e69c5955c64ec96857fab92487506c Mon Sep 17 00:00:00 2001 From: jonastheis <4181434+jonastheis@users.noreply.github.com> Date: Wed, 6 Nov 2024 17:51:24 +0800 Subject: [PATCH] add docker compose file to spin up all necessary services together --- permissionless-batches/docker-compose.yml | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 permissionless-batches/docker-compose.yml diff --git a/permissionless-batches/docker-compose.yml b/permissionless-batches/docker-compose.yml new file mode 100644 index 0000000000..fa6e5f2b4b --- /dev/null +++ b/permissionless-batches/docker-compose.yml @@ -0,0 +1,79 @@ +name: permissionless-batches + +services: + relayer: + build: + context: ../ + dockerfile: permissionless-batches/recovery_permissionless_batches.Dockerfile + container_name: permissionless-batches-relayer + volumes: + - ./conf/relayer:/app/conf + command: "--config /app/conf/config.json" + depends_on: + db: + condition: service_healthy + + db: + image: postgres:17.0 + environment: + POSTGRES_HOST_AUTH_METHOD: trust + POSTGRES_USER: postgres + POSTGRES_DB: scroll + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U postgres" ] + interval: 1s + timeout: 1s + retries: 10 + volumes: + - db_data:/var/lib/postgresql/data + ports: + - "5432:5432" + + coordinator: + build: + context: ../ + dockerfile: build/dockerfiles/coordinator-api.Dockerfile + volumes: + - ./conf/coordinator/:/app/conf + command: "--config /app/conf/config.json --http.port 8390 --verbosity 5" + depends_on: + db: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8390/coordinator/v1/challenge"] + interval: 1s + timeout: 1s + retries: 10 + start_period: 5m + + proving-service-chunk: + image: scrolltech/sdk-cloud-prover:sindri-v0.0.4 + platform: linux/amd64 + command: "--config /app/config.json" + environment: + PROVER_NAME_PREFIX: "sindri_chunk" + CIRCUIT_TYPE: 1 # 1 for chunk proving + RUST_BACKTRACE: 1 + volumes: + - ./conf/proving-service/chunk/:/app/keys + - ./conf/proving-service/config.json:/app/config.json + depends_on: + coordinator: + condition: service_healthy + + proving-service-batch: + image: scrolltech/sdk-cloud-prover:sindri-v0.0.4 + platform: linux/amd64 + command: "--config /app/config.json" + environment: + PROVER_NAME_PREFIX: "sindri_batch" + CIRCUIT_TYPE: 2 # 2 for chunk proving + volumes: + - ./conf/proving-service/batch/:/app/keys + - ./conf/proving-service/config.json:/app/config.json + depends_on: + coordinator: + condition: service_healthy + +volumes: + db_data: \ No newline at end of file