feat: docker & build

This commit is contained in:
2026-06-06 13:00:27 +03:00
parent e8e3bbe75e
commit 37c1a5944a
7 changed files with 101 additions and 3 deletions
+23
View File
@@ -0,0 +1,23 @@
# syntax=docker/dockerfile:1
# DEV image: source bind-mounted by compose, rsbuild dev server with HMR.
# node_modules lives in a named volume (see compose) so the host dir never
# shadows the container install. Build context = mcma-webui/.
FROM node:22-slim
# `modern-sk` is a git dependency (git+https://...) — npm needs git to fetch it.
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json package-lock.json modern-sk-*.tgz ./
RUN npm ci
COPY . .
EXPOSE 3000
# host 0.0.0.0 + HMR client port come from env (RSBUILD_* in compose).
# `--open` is dropped on purpose: no browser in a container.
CMD ["npx", "rsbuild", "dev"]