Skip to content

Commit

Permalink
fix: change root filesystem location for nginx to /tmp/nginx (#52)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
vasilegroza and Vasile Groza authored Feb 27, 2024
1 parent a6c2284 commit 1c653cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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 /usr/share/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}'" };' > /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
Expand Down

0 comments on commit 1c653cc

Please sign in to comment.