Refactor code structure for improved readability and maintainability

This commit is contained in:
Abdulazizzn
2025-09-19 02:43:59 +03:00
parent cb673285a0
commit 48050a41a8
7 changed files with 6938 additions and 7 deletions

View File

@@ -25,7 +25,8 @@ RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.22/main" >> /etc/apk/reposito
tzdata \
ca-certificates \
libc6-compat \
jq
jq \
ffmpeg
# Install full-icu
RUN npm install -g full-icu@1.5.0

View File

@@ -6,7 +6,7 @@ ARG TARGETPLATFORM
# ==============================================================================
# STAGE 1: System Dependencies & Base Setup
# ==============================================================================
FROM n8nio/base:${NODE_VERSION} AS system-deps
FROM n8nio/base:22-ffmpeg AS system-deps
# ==============================================================================
# STAGE 2: Application Artifact Processor

View File

@@ -29,7 +29,11 @@
"N8N_VERSION",
"ENVIRONMENT",
"DEPLOYMENT_NAME"
]
],
"env-overrides": {
"NODE_FUNCTION_ALLOW_BUILTIN": "crypto",
"NODE_FUNCTION_ALLOW_EXTERNAL": "ytdl-core,youtube-dl-exec,yt-search,ytsr,moment"
}
}
]
}

View File

@@ -112,7 +112,7 @@ COPY --from=node-alpine /usr/local/bin/node /usr/local/bin/node
# libstdc++ is required by Node
# libc6-compat is required by task-runner-launcher
RUN apk add --no-cache ca-certificates tini libstdc++ libc6-compat
RUN apk add --no-cache ca-certificates tini libstdc++ libc6-compat ffmpeg
RUN addgroup -g 1000 -S runner \
&& adduser -u 1000 -S -G runner -h /home/runner -D runner \

View File

@@ -14,6 +14,8 @@
"PATH",
"GENERIC_TIMEZONE",
"NODE_OPTIONS",
"NODE_FUNCTION_ALLOW_BUILTIN",
"NODE_FUNCTION_ALLOW_EXTERNAL",
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT",
"N8N_RUNNERS_TASK_TIMEOUT",
"N8N_RUNNERS_MAX_CONCURRENCY",
@@ -36,6 +38,8 @@
"health-check-server-port": "5682",
"allowed-env": [
"PATH",
"NODE_FUNCTION_ALLOW_BUILTIN",
"NODE_FUNCTION_ALLOW_EXTERNAL",
"N8N_RUNNERS_LAUNCHER_LOG_LEVEL",
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT",
"N8N_RUNNERS_TASK_TIMEOUT",

View File

@@ -3,6 +3,10 @@
"description": "Runtime-only extra dependencies for installing packages in the JavaScript task runner image. Installed at Docker image build time. Allow usage in the Code node via 'NODE_FUNCTION_ALLOW_EXTERNAL' env variable on n8n-task-runners.json.",
"private": true,
"dependencies": {
"moment": "2.30.1"
"moment": "2.30.1",
"ytdl-core": "^4.11.5",
"youtube-dl-exec": "^3.0.2",
"yt-search": "^2.10.4",
"ytsr": "^3.8.4"
}
}

File diff suppressed because it is too large Load Diff