From 31dcf6238a59100def0306d0eb52faf34618c7ab Mon Sep 17 00:00:00 2001 From: Vasile Groza Date: Tue, 27 Feb 2024 15:14:22 +0200 Subject: [PATCH] fix: use /tmp/nginx/html/ as nginx root the base is not nginx image so the templates will not work here --- build.sbt | 3 +-- build/nginx/nginx.conf | 2 +- build/start.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index bf535c6..4e539b7 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,6 @@ lazy val kafkamate = project env("KAFKAMATE_ENV", "prod") env("KM8_BE_HOST", "http://localhost:61234") - env("ROOT_FS", "/usr/share") expose(8080, 61234) runRaw( @@ -53,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 f24b0c1..9bfe148 100644 --- a/build/nginx/nginx.conf +++ b/build/nginx/nginx.conf @@ -6,7 +6,7 @@ http { include mime.types; sendfile on; server { - root ${ROOT_FS}/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 533d1b6..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}'" };' > "${ROOT_FS}/nginx/html/config.js" +echo 'window.KM8Config = { BE_HOST: "'${KM8_BE_HOST}'" };' > "/tmp/nginx/html/config.js" # Start nginx for site service nginx start