From c21c6284dc322fa71ebc588fe7f7e816722a8a79 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Thu, 4 Jan 2024 14:47:49 -0800 Subject: [PATCH] Fix Docker issues --- docker-compose.yml | 4 ++-- indexer/Dockerfile | 1 + indexer/queryapi_coordinator/build.rs | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a17e03ae7..ace09222f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,8 @@ services: - redis environment: REDIS_CONNECTION_STRING: redis://redis - LAKE_AWS_ACCESS_KEY: - LAKE_AWS_SECRET_ACCESS_KEY: + AWS_ACCESS_KEY_ID: MOCK + AWS_SECRET_ACCESS_KEY: MOCK QUEUE_URL: MOCK START_FROM_BLOCK_QUEUE_URL: MOCK PORT: 9180 diff --git a/indexer/Dockerfile b/indexer/Dockerfile index 925ed46f5..295442e1a 100644 --- a/indexer/Dockerfile +++ b/indexer/Dockerfile @@ -2,6 +2,7 @@ FROM rust:1.68 AS build ARG CARGO_BUILD_MODE=release WORKDIR /tmp/ COPY ./ ./ +RUN apt update && apt install -yy protobuf-compiler RUN if [ "$CARGO_BUILD_MODE" = "debug" ]; then \ cargo build --package queryapi_coordinator; \ else \ diff --git a/indexer/queryapi_coordinator/build.rs b/indexer/queryapi_coordinator/build.rs index 35e37179d..6aec1de50 100644 --- a/indexer/queryapi_coordinator/build.rs +++ b/indexer/queryapi_coordinator/build.rs @@ -1,5 +1,8 @@ // TODO: Move to New Coordinator Folder fn main() -> Result<(), Box> { - tonic_build::compile_protos("../../runner/protos/runner.proto")?; + // TODO: Update Runner Env deployment variables and docker compose file to contain RUNNER_PROTO_PATH + let proto_path = std::env::var("RUNNER_PROTO_PATH").unwrap_or_else(|_| "../../runner/protos/runner.proto".to_string()); + // TODO: Remove .ok() when we expect tonic build to succeed in deployment + tonic_build::compile_protos(proto_path).ok(); Ok(()) }