Skip to content

Commit

Permalink
chore(deps): lock file maintenance (#222)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: OMPRAKASH MISHRA <omprakashmishra3978@gmail.com>
  • Loading branch information
renovate[bot] and mishraomp committed Aug 20, 2024
1 parent 38b1c98 commit 9d353a4
Show file tree
Hide file tree
Showing 4 changed files with 4,054 additions and 2,711 deletions.
18 changes: 1 addition & 17 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# Build static files
# Node Bullseye has npm
FROM node:20.16.0-bullseye-slim AS buildWithDevDeps

# Install packages, build and keep only prod packages
WORKDIR /app
COPY *.json ./
COPY ./src ./src
COPY ./prisma ./prisma
RUN npm ci --ignore-scripts --no-update-notifier
RUN npm run prisma-generate
FROM node:20.16.0-bullseye-slim AS build

# Install packages, build and keep only prod packages
Expand All @@ -18,17 +7,12 @@ COPY ./src ./src
COPY ./prisma ./prisma
RUN npm ci --ignore-scripts --no-update-notifier --omit=dev

# COPY over few dependencies from buildWithDevDeps
COPY --from=buildWithDevDeps /app/node_modules/@prisma ./node_modules/@prisma
COPY --from=buildWithDevDeps /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=buildWithDevDeps /app/node_modules/prisma ./node_modules/prisma

RUN npm run build

# Deploy container
# Distroless has node, but not npm
FROM gcr.io/distroless/nodejs20-debian11:nonroot
ENV NODE_ENV production
ENV NODE_ENV=production

# Copy over app
WORKDIR /app
Expand Down
Loading

0 comments on commit 9d353a4

Please sign in to comment.