Dream-MachineProcurementList/docker/Dockerfile.dev

22 lines
571 B
Text
Raw Normal View History

FROM node:20-bullseye-slim
ENV npm_config_registry=https://registry.npmmirror.com
ENV npm_config_build_from_source=true
# Build prerequisites for native modules (better-sqlite3)
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 make g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Use host-built frontend; only run server here
COPY server/package.json server/tsconfig.json ./server/
COPY server/src ./server/src
RUN cd server && npm install --build-from-source && npm run build
EXPOSE 8080
CMD ["node", "server/dist/index.js"]