From 1cebe7733670b204ed29c94fbe77c106deb719c9 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 14 Jun 2024 11:00:59 +0530 Subject: [PATCH] Add docker compose file for v2 --- .../docker-compose-watcher-sushiswap-v2.yml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 stacks/stack-orchestrator/compose/docker-compose-watcher-sushiswap-v2.yml diff --git a/stacks/stack-orchestrator/compose/docker-compose-watcher-sushiswap-v2.yml b/stacks/stack-orchestrator/compose/docker-compose-watcher-sushiswap-v2.yml new file mode 100644 index 0000000..05122e2 --- /dev/null +++ b/stacks/stack-orchestrator/compose/docker-compose-watcher-sushiswap-v2.yml @@ -0,0 +1,80 @@ +version: '3.2' + +services: + sushiswap-v2-watcher-db: + restart: unless-stopped + image: postgres:14-alpine + environment: + - POSTGRES_USER=vdbm + - POSTGRES_MULTIPLE_DATABASES=sushiswap-v2-watcher,sushiswap-v2-watcher-job-queue + - POSTGRES_EXTENSION=sushiswap-v2-watcher-job-queue:pgcrypto + - POSTGRES_PASSWORD=password + volumes: + - ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh + - sushiswap_v2_watcher_db_data:/var/lib/postgresql/data + ports: + - "5432" + healthcheck: + test: ["CMD", "nc", "-v", "localhost", "5432"] + interval: 20s + timeout: 5s + retries: 15 + start_period: 10s + + sushiswap-v2-watcher-job-runner: + restart: unless-stopped + depends_on: + sushiswap-v2-watcher-db: + condition: service_healthy + image: cerc/watcher-sushiswap:local + environment: + CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} + CERC_ETH_RPC_ENDPOINTS: ${CERC_ETH_RPC_ENDPOINTS} + working_dir: /app/packages/v2-watcher + command: ["bash", "./start-job-runner.sh"] + volumes: + - ../config/watcher-sushiswap-v2/watcher-config-template.toml:/app/packages/v2-watcher/environments/watcher-config-template.toml + - ../config/watcher-sushiswap-v2/start-job-runner.sh:/app/packages/v2-watcher/start-job-runner.sh + ports: + - "9000:9000" + healthcheck: + test: ["CMD", "nc", "-vz", "127.0.0.1", "9000"] + interval: 20s + timeout: 5s + retries: 15 + start_period: 5s + extra_hosts: + - "host.docker.internal:host-gateway" + + sushiswap-v2-watcher-server: + restart: unless-stopped + depends_on: + sushiswap-v2-watcher-db: + condition: service_healthy + sushiswap-v2-watcher-job-runner: + condition: service_healthy + image: cerc/watcher-sushiswap:local + environment: + CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} + CERC_ETH_RPC_ENDPOINTS: ${CERC_ETH_RPC_ENDPOINTS} + working_dir: /app/packages/v2-watcher + command: ["bash", "./start-server.sh"] + volumes: + - ../config/watcher-sushiswap-v2/watcher-config-template.toml:/app/packages/v2-watcher/environments/watcher-config-template.toml + - ../config/watcher-sushiswap-v2/start-server.sh:/app/packages/v2-watcher/start-server.sh + - sushiswap_v2_watcher_gql_logs_data:/app/packages/v2-watcher/gql-logs + ports: + - "3008" + - "9001" + healthcheck: + test: ["CMD", "nc", "-vz", "127.0.0.1", "3008"] + interval: 20s + timeout: 5s + retries: 15 + start_period: 5s + extra_hosts: + - "host.docker.internal:host-gateway" + +volumes: + sushiswap_v2_watcher_db_data: + sushiswap_v2_watcher_gql_logs_data: