Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(deploy): whitespace in env.example

justin5852c2436eb0
diff --git a/.env.sample b/.env.sample
index 51f03fb29..03d0343cb 100644
--- a/.env.sample
+++ b/.env.sample
@@ -1,5 +1,6 @@
# General URLs
-KANEO_CLIENT_URL= # e.g. http://localhost:5173
+# KANEO_CLIENT_URL=http://localhost:5173
+# KANEO_API_URL=http://localhost:1337
# KANEO_API_URL= # optional — defaults to KANEO_CLIENT_URL/api
# Database
diff --git a/deploy/kaneo-entrypoint.sh b/deploy/kaneo-entrypoint.sh
index 5fd53eff0..232cac608 100644
--- a/deploy/kaneo-entrypoint.sh
+++ b/deploy/kaneo-entrypoint.sh
@@ -21,8 +21,9 @@ cleanup() {
trap cleanup EXIT INT TERM
# Derive KANEO_API_URL from KANEO_CLIENT_URL if not explicitly set
-if [ -z "${KANEO_API_URL:-}" ] && [ -n "${KANEO_CLIENT_URL:-}" ]; then
- export KANEO_API_URL="${KANEO_CLIENT_URL}/api"
+client_url_trimmed="$(printf '%s' "${KANEO_CLIENT_URL:-}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
+if [ -z "${KANEO_API_URL:-}" ] && [ -n "$client_url_trimmed" ]; then
+ export KANEO_API_URL="${client_url_trimmed}/api"
echo "KANEO_API_URL not set — derived from KANEO_CLIENT_URL: $KANEO_API_URL"
fi