All checks were successful
Build & Push Docker Image / build-and-push (push) Successful in 42s
- runtime: use node user (uid=1000, gid=1000) instead of custom tonemark uid=1001 - add ffmpeg and yt-dlp to runtime image (required by audio pipeline) - add tzdata, set TZ=Europe/Zurich - +page.svelte: replace hardcoded ACCENT constant with $derived($accent.value) so the home page reacts to accent store changes from Settings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
46 lines
1.4 KiB
Docker
46 lines
1.4 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# ── Stage 1: build ──────────────────────────────────────────────────────────
|
|
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies first (better layer caching)
|
|
COPY package.json package-lock.json ./
|
|
RUN npm install
|
|
|
|
# Copy source and build
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Prune dev dependencies
|
|
RUN npm prune --production
|
|
|
|
# ── Stage 2: runtime ─────────────────────────────────────────────────────────
|
|
FROM node:22-alpine AS runtime
|
|
|
|
WORKDIR /app
|
|
|
|
# Runtime tools + timezone data
|
|
RUN apk add --no-cache ffmpeg tzdata && \
|
|
wget -qO /usr/local/bin/yt-dlp \
|
|
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \
|
|
chmod +x /usr/local/bin/yt-dlp
|
|
|
|
# Copy built output and production node_modules
|
|
# node:22-alpine ships with user node (uid=1000, gid=1000)
|
|
COPY --from=builder --chown=node:node /app/build ./build
|
|
COPY --from=builder --chown=node:node /app/node_modules ./node_modules
|
|
COPY --from=builder --chown=node:node /app/package.json ./
|
|
|
|
USER node
|
|
|
|
EXPOSE 3000
|
|
|
|
ENV NODE_ENV=production \
|
|
PORT=3000 \
|
|
HOST=0.0.0.0 \
|
|
TZ=Europe/Zurich
|
|
|
|
CMD ["node", "build/index.js"]
|