18 lines
597 B
Docker
18 lines
597 B
Docker
FROM node:20-alpine
|
|
WORKDIR /app
|
|
COPY package.json ./
|
|
RUN npm install --omit=dev
|
|
# OpenCV.js WASM for the v3 board-solve engine — fetched at build time so the
|
|
# repo stays small. Pinned to the build validated against the solver tests.
|
|
RUN npm install --no-save @techstark/opencv-js@4.12.0-release.1 \
|
|
&& mkdir -p public/vendor \
|
|
&& cp node_modules/@techstark/opencv-js/dist/opencv.js public/vendor/opencv.js \
|
|
&& rm -rf node_modules/@techstark
|
|
COPY server ./server
|
|
COPY data ./data
|
|
COPY public ./public
|
|
ENV PORT=33044
|
|
ENV LIVE_DIR=/app/data/live
|
|
EXPOSE 33044
|
|
CMD ["node", "server/server.js"]
|