Skip to content

Commit

Permalink
ar(feat) [DPTM-8] Dockerize and GCP
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloreale committed Aug 24, 2024
1 parent 0b31635 commit 4674ddf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:20 AS base
FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
# RUN apk add --no-cache libc6-compat
RUN apk add --no-cache libc6-compat

WORKDIR /app
ARG NEXUS_STANDALONE
Expand All @@ -23,8 +23,6 @@ RUN \
else echo "Lockfile not found." && exit 1; \
fi

RUN npm i -g pm2

# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
Expand Down Expand Up @@ -134,6 +132,8 @@ RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

RUN npm i -g pm2

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next
Expand Down

0 comments on commit 4674ddf

Please sign in to comment.