Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
akadapa authored Jun 5, 2024
1 parent da07dc6 commit 831882a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM node:20 as buildContainer
WORKDIR /app

# Install curl for buildContainer
RUN apt-get update && apt-get install -y curl

COPY . /app
RUN npm install -g npm@latest
RUN npm install --legacy-peer-deps

# Install curl for buildContainer
RUN apt-get update && apt-get install -y curl

# max-old-space is needed to avoid any compilation issues because of missing memory
ENV NODE_OPTIONS --max-old-space-size=4096
RUN npm run build:ssr
Expand All @@ -16,15 +16,15 @@ FROM node:20-alpine

WORKDIR /app

# Install curl for productionContainer
RUN apk add --no-cache curl

COPY --from=buildContainer /app/package.json /app

ENV NODE_OPTIONS --max-old-space-size=16384
RUN npm i firebase --legacy-peer-deps
RUN npm install pm2@latest -g

# Install curl for productionContainer
RUN apk add --no-cache curl

# Get all the code needed to run the app
COPY --from=buildContainer /app/dist /app/dist

Expand Down

0 comments on commit 831882a

Please sign in to comment.