v3: Dockerfile — fetch pinned OpenCV.js WASM at build time
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user