Spaces:
Sleeping
Sleeping
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
|
@@ -18,8 +18,9 @@ RUN apk add --no-cache \
|
|
| 18 |
make \
|
| 19 |
g++
|
| 20 |
|
| 21 |
-
# Install n8n globally
|
| 22 |
-
|
|
|
|
| 23 |
npm cache clean --force
|
| 24 |
|
| 25 |
# --------------- Stage 2: Runtime (lean, no build toolchain) ------------------
|
|
@@ -44,7 +45,10 @@ COPY --from=build /usr/local/bin/n8n /usr/local/bin/n8n
|
|
| 44 |
# No addgroup/adduser needed — start.sh uses su-exec 1000:1000.
|
| 45 |
|
| 46 |
# ---------- Environment -------------------------------------------------------
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
N8N_PROTOCOL=https \
|
| 49 |
N8N_USER_FOLDER=/data/.n8n \
|
| 50 |
N8N_DIAGNOSTICS_ENABLED=false \
|
|
|
|
| 18 |
make \
|
| 19 |
g++
|
| 20 |
|
| 21 |
+
# Install n8n globally (semver installed explicitly to avoid module resolution
|
| 22 |
+
# issues when running via su-exec in the runtime stage)
|
| 23 |
+
RUN npm install -g semver n8n@latest --omit=dev && \
|
| 24 |
npm cache clean --force
|
| 25 |
|
| 26 |
# --------------- Stage 2: Runtime (lean, no build toolchain) ------------------
|
|
|
|
| 45 |
# No addgroup/adduser needed — start.sh uses su-exec 1000:1000.
|
| 46 |
|
| 47 |
# ---------- Environment -------------------------------------------------------
|
| 48 |
+
# NODE_PATH tells Node where to find globally-installed modules (fixes
|
| 49 |
+
# "Cannot find module 'semver/functions/satisfies'" at runtime)
|
| 50 |
+
ENV NODE_PATH=/usr/local/lib/node_modules \
|
| 51 |
+
N8N_PORT=7860 \
|
| 52 |
N8N_PROTOCOL=https \
|
| 53 |
N8N_USER_FOLDER=/data/.n8n \
|
| 54 |
N8N_DIAGNOSTICS_ENABLED=false \
|