Skip to content

Commit

Permalink
Update Dockerfile.teachers
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhilashKD authored Jan 22, 2025
1 parent 29b9ae2 commit af647f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile.teachers
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ RUN npm install -g pnpm && mkdir -p $PNPM_HOME
# Use bash to run the setup commands
RUN /bin/bash -c "echo 'export SHELL=/bin/bash' >> ~/.bashrc && . ~/.bashrc && pnpm setup"

# Copy package.json and package-lock.json to the working directory for caching dependencies
COPY package*.json ./
# Copy package.json and pnpm-lock.yaml (pnpm-lock.json for pnpm v7+)
COPY package.json pnpm-lock.yaml ./

# Install dependencies using pnpm (this will be cached unless package.json changes)
RUN pnpm install
# Install dependencies using pnpm (this will be cached unless package.json or pnpm-lock.yaml changes)
RUN pnpm install --frozen-lockfile

# Copy the entire NX workspace
# Copy the entire workspace after installing dependencies to leverage cache
COPY . .

# Build specific applications
RUN npx nx run-many --target=build --projects=teachers,authentication,scp-teacher,youthNet --parallel=10
RUN npx nx run-many --target=build --projects=teachers,authentication,scp-teacher,youthNet --parallel=10 --verbose || true

# Stage 2: Production Stage
FROM node:20
Expand Down

0 comments on commit af647f6

Please sign in to comment.