Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
ARG NODE_VERSION=22-alpine
# Lockfile-hash cache key — auto-busts npm BuildKit caches when package-lock.json
# changes. Passed as a build-arg from the workflow: hashFiles('package-lock.json').
# Bump the default (v1 → v2) only if you need a forced one-off cache wipe.
ARG NPM_CACHE_KEY=v2
# Bump the default (v3 → v4) only if you need a forced one-off cache wipe.
ARG NPM_CACHE_KEY=v4

FROM node:${NODE_VERSION} AS base-runtime

Expand Down Expand Up @@ -45,7 +45,7 @@

# Build stage — installs all deps, generates prisma, builds shared + target
FROM node:${NODE_VERSION} AS build
ARG NPM_CACHE_KEY

Check warning on line 48 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build — bot

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NPM_CACHE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 48 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build — backend

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NPM_CACHE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 48 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build — frontend

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NPM_CACHE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

RUN apk add --no-cache git build-base python3 python3-dev opus-dev && rm -rf /var/cache/apk/*

Expand All @@ -57,7 +57,7 @@
COPY packages/backend/package*.json ./packages/backend/
COPY packages/frontend/package*.json ./packages/frontend/

RUN --mount=type=cache,id=npm-build-stage-v2-${NPM_CACHE_KEY},target=/root/.npm,sharing=locked \
RUN --mount=type=cache,id=npm-build-stage-v4-${NPM_CACHE_KEY},target=/root/.npm,sharing=locked \
YOUTUBE_DL_SKIP_DOWNLOAD=1 \
npm ci --legacy-peer-deps --no-audit --no-fund && \
(npm cache verify 2>/dev/null || true)
Expand Down Expand Up @@ -89,7 +89,7 @@

# Production deps — slim install (no dev deps)
FROM node:${NODE_VERSION} AS deps-production
ARG NPM_CACHE_KEY

Check warning on line 92 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build — bot

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NPM_CACHE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 92 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build — backend

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NPM_CACHE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

RUN apk add --no-cache python3 && rm -rf /var/cache/apk/*

Expand All @@ -101,7 +101,7 @@
COPY packages/backend/package*.json ./packages/backend/
COPY packages/frontend/package*.json ./packages/frontend/

RUN --mount=type=cache,id=npm-deps-production-v2-${NPM_CACHE_KEY},target=/root/.npm,sharing=locked \
RUN --mount=type=cache,id=npm-deps-production-v4-${NPM_CACHE_KEY},target=/root/.npm,sharing=locked \
YOUTUBE_DL_SKIP_DOWNLOAD=1 \
YOUTUBE_DL_SKIP_PYTHON_CHECK=1 \
npm ci --legacy-peer-deps --omit=dev --no-audit --no-fund && \
Expand Down
Loading