Skip to content

Commit

Permalink
fix: fixes missing tsc dependency installation in CI/CD when deploy…
Browse files Browse the repository at this point in the history
…ing socket.io server
  • Loading branch information
andreahaku committed Dec 13, 2023
1 parent 55c1dd3 commit a7647dd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/sdk-socket-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ ENV NODE_ENV=${NODE_ENV}

WORKDIR /app
COPY package.json ./
RUN yarn install
COPY yarn.lock ./

# Install all dependencies including devDependencies
RUN yarn install --frozen-lockfile

COPY . .
RUN yarn build

Expand All @@ -18,9 +22,10 @@ FROM node:18-alpine

WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/yarn.lock ./

# If NODE_ENV is development, install all dependencies, else only production dependencies
RUN if [ "$NODE_ENV" = "development" ]; then yarn install; else yarn install --production; fi
RUN if [ "$NODE_ENV" = "development" ]; then yarn install --frozen-lockfile; else yarn install --production --frozen-lockfile; fi

COPY --from=builder /app/dist ./dist
COPY .env ./
Expand Down

0 comments on commit a7647dd

Please sign in to comment.