Skip to content

Commit

Permalink
Install all dependencies for build.
Browse files Browse the repository at this point in the history
Uses prune to remove devDependencies.
  • Loading branch information
emmiegit committed Apr 22, 2024
1 parent 5b11399 commit 64e03f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
11 changes: 3 additions & 8 deletions install/aws/dev/docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,19 @@ FROM node:19-alpine
# Install pnpm
RUN npm install -g pnpm

# Copy source
# Copy sources
RUN mkdir /app
WORKDIR /app
COPY framerail/ ./
COPY assets ./src/assets

# Install app
RUN \
pnpm install --prod && \
pnpm install && \
pnpm build && \
pnpm prune --prod && \
rm -rf src/ tests/

COPY framerail/package.json framerail/pnpm-lock.yaml ./
COPY assets ./src/assets
RUN pnpm install --prod
RUN pnpm build
RUN pnpm prune --prod

# Run command
USER node:node
ENV NODE_ENV=production
Expand Down
11 changes: 3 additions & 8 deletions install/aws/prod/docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,19 @@ FROM node:19-alpine
# Install pnpm
RUN npm install -g pnpm

# Copy source
# Copy sources
RUN mkdir /app
WORKDIR /app
COPY framerail/ ./
COPY assets ./src/assets

# Install app
RUN \
pnpm install --prod && \
pnpm install && \
pnpm build && \
pnpm prune --prod && \
rm -rf src/ tests/

COPY framerail/package.json framerail/pnpm-lock.yaml ./
COPY assets ./src/assets
RUN pnpm install --prod
RUN pnpm build
RUN pnpm prune --prod

# Run command
USER node:node
ENV NODE_ENV=production
Expand Down

0 comments on commit 64e03f0

Please sign in to comment.