legends810 commited on
Commit
e9c25c2
·
verified ·
1 Parent(s): bd22336

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 set -eux; \
21
- cat >/usr/local/bin/start.sh <<'BASH' && \
22
  chmod +x /usr/local/bin/start.sh
23
- #!/usr/bin/env bash
24
- set -euo pipefail
25
 
26
- export N8N_PORT="${PORT:-7860}" # HF देता है $PORT, लोकली 7860
27
 
28
- # --------- figure out public URL (for webhooks / editor) --------------------
29
  if [ -n "${SPACE_ID:-}" ]; then
30
  APP_URL="https://${SPACE_ID}.hf.space"
31
- elif [ -n "${SPACE_HOST:-}" ]; then # older env-var
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
- BASH
 
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 #####################################