This commit is contained in:
NoLogicAlan committed 2026-10-06 00:32:48 +03:00
1 parent 2f51b7e1d7
commit 97fe282bb3
29 files changed
+101 -431

No files matched your search

+8 -16
View File
@@ -5,20 +5,18 @@ FROM node:22-bookworm-slim AS builder
WORKDIR /app
# .npmrc carries legacy-peer-deps (the @fluxerjs peer ranges conflict); package-lock.json pins versions.
COPY package.json package-lock.json* .npmrc ./
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev --legacy-peer-deps || npm install --omit=dev --legacy-peer-deps
RUN npm ci --omit=dev --legacy-peer-deps 2>/dev/null || npm install --omit=dev --legacy-peer-deps
COPY . .
# ---- Runtime stage: minimal image ----
# No ffmpeg: audio goes through NodeLink and the in-process Opus/WebM pipeline; ffprobe comes from
# the bundled ffprobe-static package.
# ---- Runtime stage: minimal image with ffmpeg ----
FROM node:22-bookworm-slim AS runtime
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
tini \
curl \
ca-certificates \
@@ -34,19 +32,13 @@ COPY --from=builder --chown=10001:10001 /app ./
RUN chmod +x docker/docker-entrypoint.sh && \
mkdir -p /app/storage && chown -R 10001:10001 /app
# Commit shown by the bot (the image has no .git). CI passes it with --build-arg GIT_SHA=<sha>.
ARG GIT_SHA=""
ENV GIT_SHA=${GIT_SHA}
# The bot touches this file every 15s while its event loop is running and it is logged in.
# docker/healthcheck.mjs reports unhealthy when it is missing or stale (no procps needed).
ENV HEARTBEAT_FILE=/tmp/remix-heartbeat
USER 10001:10001
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD ["node", "docker/healthcheck.mjs"]
CMD pgrep -f "node .*index.mjs" >/dev/null 2>&1 || pgrep -f "node .*shard.mjs" >/dev/null 2>&1 || exit 1
ENTRYPOINT ["/usr/bin/tini", "--", "/app/docker/docker-entrypoint.sh"]
CMD ["node", "index.mjs"]
CMD ["node", "index.mjs"]