Newer
Older

Lukáš Kratochvíl
committed
# install node_modules outside app root in container so local development won't run into a problem of bind-mounting over it with local source code

Lukáš Kratochvíl
committed
WORKDIR /usr/src
COPY ["package.json", "package-lock.json", "./"]

Lukáš Kratochvíl
committed
# ensures that exactly these executables (from the node_modules folder) are used instead of any other executables which might also be installed on the system inside the Docker image

Lukáš Kratochvíl
committed
ENV PATH=/usr/src/node_modules/.bin:$PATH
WORKDIR /usr/src/app
COPY prisma/schema.prisma ./prisma/
RUN npx prisma generate

Lukáš Kratochvíl
committed
RUN npm run build