From 1c653cc5d66fc4544fee7b717e014ab4c6b9be9a Mon Sep 17 00:00:00 2001 From: vasilegroza Date: Tue, 27 Feb 2024 14:19:46 +0100 Subject: [PATCH] fix: change root filesystem location for nginx to /tmp/nginx (#52) * fix: add support for rootfs nginx overwrite * fix: use /tmp/nginx/html/ as nginx root the base is not nginx image so the templates will not work here --------- Co-authored-by: Vasile Groza --- build.sbt | 2 +- build/nginx/nginx.conf | 2 +- build/start.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index d39346d..4e539b7 100644 --- a/build.sbt +++ b/build.sbt @@ -52,7 +52,7 @@ lazy val kafkamate = project copy(baseDirectory(_ / "build" / "start.sh").value, "start.sh") add(artifact, artifactTargetPath) - copy(baseDirectory(_ / "site" / "build").value, "/usr/share/nginx/html/") + copy(baseDirectory(_ / "site" / "build").value, "/tmp/nginx/html/") entryPoint("/usr/bin/dumb-init", "--") cmd("./start.sh", artifactTargetPath) diff --git a/build/nginx/nginx.conf b/build/nginx/nginx.conf index 1b3bf15..9bfe148 100644 --- a/build/nginx/nginx.conf +++ b/build/nginx/nginx.conf @@ -6,7 +6,7 @@ http { include mime.types; sendfile on; server { - root /usr/share/nginx/html/; + root /tmp/nginx/html/; index index.html; server_name localhost; listen 8080; diff --git a/build/start.sh b/build/start.sh index b0d1bc0..7572011 100755 --- a/build/start.sh +++ b/build/start.sh @@ -3,7 +3,7 @@ set -m # Set FE configuration -echo 'window.KM8Config = { BE_HOST: "'${KM8_BE_HOST}'" };' > /usr/share/nginx/html/config.js +echo 'window.KM8Config = { BE_HOST: "'${KM8_BE_HOST}'" };' > "/tmp/nginx/html/config.js" # Start nginx for site service nginx start