diff --git a/Dockerfile.multichain b/Dockerfile.multichain index c6588809..396760bb 100644 --- a/Dockerfile.multichain +++ b/Dockerfile.multichain @@ -25,7 +25,7 @@ RUN update-ca-certificates COPY --from=builder /usr/src/app/target/release/mpc-node /usr/local/bin/mpc-node # Create a script to start both Redis and the Rust app -RUN echo "#!/bin/bash\nservice redis-server start\nexec mpc-node" > /start.sh \ +RUN echo "#!/bin/bash\nservice redis-server start ./redis.conf\nexec mpc-node" > /start.sh \ && chmod +x /start.sh WORKDIR /usr/local/bin diff --git a/infra/multichain-dev/main.tf b/infra/multichain-dev/main.tf index b864fa42..1655d378 100644 --- a/infra/multichain-dev/main.tf +++ b/infra/multichain-dev/main.tf @@ -14,6 +14,14 @@ module "gce-container" { args = ["start"] port = "3000" + volumeMounts = [ + { + mountPath = "/data" + name = "host-path" + readOnly = false + } + ] + env = concat(var.static_env, [ { name = "MPC_NODE_ID" @@ -61,6 +69,15 @@ module "gce-container" { } ]) } + + volumes = [ + { + name = "host-path" + hostPath = { + path = "/etc/redis" + } + } + ] } resource "google_compute_address" "internal_ips" {