add custom host support in container (#1)
authorserenissi <redacted>
Thu, 20 Mar 2025 21:21:22 +0000 (02:51 +0530)
committerGitHub <redacted>
Thu, 20 Mar 2025 21:21:22 +0000 (02:51 +0530)
This adds an env for user specified host (including ipv6!).

entrypoint.sh

index 4d52468c046c9acdae801d76b4717910a29d05da..a489e0650407b5f46644123694cd47da22af3641 100644 (file)
@@ -2,6 +2,7 @@
 
 [ "$EXEC_TOOL" ] || EXEC_TOOL=gosu
 [ "$FLATNOTES_PORT" ] || FLATNOTES_PORT=8080
+[ "$FLATNOTES_HOST" ] || FLATNOTES_HOST=0.0.0.0
 
 set -e
 
@@ -24,7 +25,7 @@ flatnotes_command="python -m \
                   uvicorn \
                   main:app \
                   --app-dir server \
-                  --host 0.0.0.0 \
+                  --host ${FLATNOTES_HOST} \
                   --port ${FLATNOTES_PORT} \
                   --proxy-headers \
                   --forwarded-allow-ips '*'"
git clone https://git.99rst.org/PROJECT