stacker.news/Dockerfile
ekzyis b5003be8cb
Fix module not found if new package added (#2503)
* Fix module not found if new package added

* remove incorrect comment

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2025-09-09 19:32:32 -05:00

22 lines
484 B
Docker

# syntax=docker/dockerfile:1
FROM node:18.20.4-bullseye
ENV NODE_ENV=development
ARG UID
ARG GID
RUN groupadd -fg "$GID" apprunner
RUN useradd -om -u "$UID" -g "$GID" apprunner
USER apprunner
WORKDIR /app
EXPOSE 3000
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps --loglevel verbose
# run npm ci again because we're mounting node_modules in local dev
CMD ["sh","-c","npm ci --legacy-peer-deps --loglevel verbose && npx prisma migrate dev && npm run dev"]