Skip to content

Commit

Permalink
added redis config file path to dockerfile, added tf to mount /data v…
Browse files Browse the repository at this point in the history
…olume
  • Loading branch information
kmaus-near committed Oct 15, 2024
1 parent 91d25dd commit 05e8394
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile.multichain
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions infra/multichain-dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -61,6 +69,15 @@ module "gce-container" {
}
])
}

volumes = [
{
name = "host-path"
hostPath = {
path = "/etc/redis"
}
}
]
}

resource "google_compute_address" "internal_ips" {
Expand Down

0 comments on commit 05e8394

Please sign in to comment.