Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -3
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
###############################################################################
|
| 2 |
-
# n8n for Hugging Face Spaces –
|
| 3 |
###############################################################################
|
| 4 |
FROM docker.n8n.io/n8nio/n8n:latest
|
| 5 |
|
|
@@ -26,9 +26,11 @@ set -eu
|
|
| 26 |
N8N_PORT="${PORT:-7860}"
|
| 27 |
export N8N_PORT
|
| 28 |
|
| 29 |
-
#
|
| 30 |
if [ -n "${SPACE_ID:-}" ]; then
|
| 31 |
-
|
|
|
|
|
|
|
| 32 |
elif [ -n "${SPACE_HOST:-}" ]; then
|
| 33 |
APP_URL="https://${SPACE_HOST}"
|
| 34 |
else
|
|
|
|
| 1 |
###############################################################################
|
| 2 |
+
# n8n for Hugging Face Spaces – with correct URL generation
|
| 3 |
###############################################################################
|
| 4 |
FROM docker.n8n.io/n8nio/n8n:latest
|
| 5 |
|
|
|
|
| 26 |
N8N_PORT="${PORT:-7860}"
|
| 27 |
export N8N_PORT
|
| 28 |
|
| 29 |
+
# Hugging Face URL generation fix
|
| 30 |
if [ -n "${SPACE_ID:-}" ]; then
|
| 31 |
+
# SPACE_ID format: username/spacename
|
| 32 |
+
# Convert to: username-spacename.hf.space
|
| 33 |
+
APP_URL="https://$(echo "$SPACE_ID" | sed 's/\//-/').hf.space"
|
| 34 |
elif [ -n "${SPACE_HOST:-}" ]; then
|
| 35 |
APP_URL="https://${SPACE_HOST}"
|
| 36 |
else
|