Skip to content

Commit

Permalink
fix: use /tmp/nginx/html/ as nginx root
Browse files Browse the repository at this point in the history
the base is not nginx image so the templates will not work here
  • Loading branch information
Vasile Groza committed Feb 27, 2024
1 parent b518356 commit 31dcf62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion build/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31dcf62

Please sign in to comment.