Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -17,18 +17,17 @@ ENV N8N_HOST=0.0.0.0 \
|
|
| 17 |
|
| 18 |
########## create tiny start script inside the image ##########################
|
| 19 |
USER root
|
| 20 |
-
RUN
|
| 21 |
-
cat >/usr/local/bin/start.sh <<'BASH' && \
|
| 22 |
chmod +x /usr/local/bin/start.sh
|
| 23 |
-
#!/
|
| 24 |
-
set -
|
| 25 |
|
| 26 |
-
export N8N_PORT="${PORT:-7860}"
|
| 27 |
|
| 28 |
-
#
|
| 29 |
if [ -n "${SPACE_ID:-}" ]; then
|
| 30 |
APP_URL="https://${SPACE_ID}.hf.space"
|
| 31 |
-
elif [ -n "${SPACE_HOST:-}" ]; then
|
| 32 |
APP_URL="https://${SPACE_HOST}"
|
| 33 |
else
|
| 34 |
APP_URL="http://localhost:${N8N_PORT}"
|
|
@@ -47,7 +46,8 @@ echo "🗜️ Compression : disabled"
|
|
| 47 |
echo
|
| 48 |
|
| 49 |
exec su-exec node n8n start
|
| 50 |
-
|
|
|
|
| 51 |
USER node
|
| 52 |
|
| 53 |
########## (optional) expose default port #####################################
|
|
|
|
| 17 |
|
| 18 |
########## create tiny start script inside the image ##########################
|
| 19 |
USER root
|
| 20 |
+
RUN cat >/usr/local/bin/start.sh <<'SCRIPT' && \
|
|
|
|
| 21 |
chmod +x /usr/local/bin/start.sh
|
| 22 |
+
#!/bin/sh
|
| 23 |
+
set -e
|
| 24 |
|
| 25 |
+
export N8N_PORT="${PORT:-7860}"
|
| 26 |
|
| 27 |
+
# figure out public URL for webhooks/editor
|
| 28 |
if [ -n "${SPACE_ID:-}" ]; then
|
| 29 |
APP_URL="https://${SPACE_ID}.hf.space"
|
| 30 |
+
elif [ -n "${SPACE_HOST:-}" ]; then
|
| 31 |
APP_URL="https://${SPACE_HOST}"
|
| 32 |
else
|
| 33 |
APP_URL="http://localhost:${N8N_PORT}"
|
|
|
|
| 46 |
echo
|
| 47 |
|
| 48 |
exec su-exec node n8n start
|
| 49 |
+
SCRIPT
|
| 50 |
+
|
| 51 |
USER node
|
| 52 |
|
| 53 |
########## (optional) expose default port #####################################
|