Add server mode

This commit is contained in:
√(noham)²
2026-06-19 21:52:42 +02:00
parent 54cb28c488
commit 14bdb440a8
6 changed files with 218 additions and 0 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM node:22-bookworm-slim
# Install Chromium
RUN apt-get update && apt-get install -y \
chromium \
unzip \
ca-certificates \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Tell Puppeteer to use the system Chromium instead of downloading its own
ENV PUPPETEER_SKIP_BROWSER_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
COPY . .
# Pre-download the Reader View extension so it works offline at runtime
RUN node src/download-extension.js
RUN useradd -m appuser && chown -R appuser:appuser /app
USER appuser
EXPOSE 8080
ENV PORT=8080
ENV LOG_LEVEL=info
CMD ["node", "src/server.js"]