From 2d4504dbe08481285a0b151d29ab435a02b8c8c2 Mon Sep 17 00:00:00 2001 From: Louis Hollingworth Date: Sun, 18 Jun 2023 19:19:38 +0100 Subject: [PATCH] More modifications to Dockerfile Signed-off-by: Louis Hollingworth --- Dockerfile | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c8e399..2bb7c4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:lts-alpine as build-runner # Set temp directory -WORKDIR /tmp/app +WORKDIR /app # Move package.json COPY package.json . @@ -13,29 +13,13 @@ RUN npm install # Move source files COPY src ./src COPY tsconfig.json . +COPY prisma ./prisma # Build project RUN npx prisma generate -RUN npm run build - -## production runner -FROM node:lts-alpine as prod-runner - -# Set work directory -WORKDIR /app - -# Copy package.json from build-runner -COPY --from=build-runner /tmp/app/package.json /app/package.json - -# Install dependencies -RUN npm install --omit=dev -RUN npx prisma generate - -# Move build files -COPY --from=build-runner /tmp/app/build /app/build # Start bot -CMD [ "npm", "run", "start" ] +CMD [ "npm", "run", "dev" ] LABEL org.opencontainers.image.source=https://git.ludoviko.ch/lucxjo/er LABEL org.opencontainers.image.description="A Discord bot for the Young Royals guild"