Skip to content

Commit

Permalink
Refactor package management: Update dockerfile.backoffice to use corr…
Browse files Browse the repository at this point in the history
…ect path for tsconfig.json and optimize build process
  • Loading branch information
Sivanwol committed Sep 10, 2024
1 parent 867e94b commit b63f093
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions apps/backoffice/dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM node:20-alpine AS base
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache python3 make g++ libc6-compat && apk update

FROM base AS builder
WORKDIR /app

ENV NODE_ENV production
ENV CI true
ENV SKIP_ENV_VALIDATION true

FROM base AS builder
WORKDIR /app

RUN npm install -g turbo
COPY . .
RUN turbo prune --scope=@app/backoffice --docker
Expand All @@ -32,12 +31,8 @@ COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml

# Build the project and its dependencies
COPY --from=builder /app/out/full/ .
RUN ls -ga
RUN ls -ga /app/
RUN pnpm install --frozen-lockfile
## This would be useful for browser environment variables that are actually baked at build time and you aren't passing them in otherwise.
# COPY .env.production .env.production
RUN CI=true SKIP_ENV_VALIDATION=true turbo run build --filter=@app/backoffice
RUN pnpm turbo build --filter=@app/backoffice

FROM base AS runner
WORKDIR /app
Expand Down

0 comments on commit b63f093

Please sign in to comment.