From 0e79033d5586ecba38a660aa90b42b38966ef3f1 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Mon, 16 Dec 2024 16:37:41 +0100 Subject: [PATCH] feat(dockerfile): Make workdir read/writable by root group for k8s --- Dockerfile | 2 ++ src/settings.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f3a1a14..9388d3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,8 @@ RUN apk add --no-cache \ # ensure the UTC timezone is set ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime +RUN chmod -R g+rw /opt/barad-dur && chgrp -R 0 /opt/barad-dur + WORKDIR /opt/barad-dur COPY --from=builder /app/target/release/barad-dur /usr/local/bin/barad-dur COPY --from=builder /app/migrations /opt/barad-dur/migrations diff --git a/src/settings.rs b/src/settings.rs index 50608d9..1172430 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -24,7 +24,7 @@ impl Settings { .set_default("server.host", "[::]:8080")? .set_default("log.level", "warn")? .add_source( - Environment::with_prefix("BDR") + Environment::with_prefix("FAMEDLY_BDR") .prefix_separator("__") .separator("__"), )