Files
liqa/server/Dockerfile
T
ars9 5cc16725fb chore(repo): restructure as monorepo with server and client workspaces
- move NestJS app into server/ subdirectory
- add client/ React+TypeScript (Vite) app with Hello World
- update docker-compose to build and run both services
- add root package.json declaring npm workspaces
- update .gitignore to cover node_modules and dist at all depths
2026-04-08 21:28:01 +03:00

40 lines
1.2 KiB
Docker

# ── Build stage ──────────────────────────────────────────────────────────────
FROM node:22-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY nest-cli.json tsconfig*.json ./
COPY src ./src
RUN npm run build
# ── Runtime stage ─────────────────────────────────────────────────────────────
FROM node:22-slim AS runtime
# Playwright / Chromium system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
fonts-noto \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Tell Playwright to use the system Chromium instead of downloading its own
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=builder /app/dist ./dist
# Runtime directories (keys and SQLite DB mounted via volumes)
RUN mkdir -p data keys
EXPOSE 3000
CMD ["node", "dist/main"]