Skip to content

Commit

Permalink
Fix server container build
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesBochet committed Mar 15, 2024
1 parent e0ae12f commit 5e5ae0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/twenty-docker/prod/twenty-front/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ WORKDIR /app
COPY ./package.json .
COPY ./yarn.lock .
COPY ./.yarnrc.yml .
COPY ./nx.json .
COPY ./tsconfig.base.json .
COPY ./.yarn/releases /app/.yarn/releases
COPY ./tools/eslint-rules /app/tools/eslint-rules
Expand Down
15 changes: 12 additions & 3 deletions packages/twenty-docker/prod/twenty-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
FROM node:18.16.0-alpine as twenty-server
FROM node:18.16.0-alpine as twenty-server-build

WORKDIR /app

COPY ./package.json .
COPY ./yarn.lock .
COPY ./.yarnrc.yml .
COPY ./tsconfig.base.json .
COPY ./nx.json .
COPY ./.yarn/releases /app/.yarn/releases
COPY ./packages/twenty-emails /app/packages/twenty-emails
COPY ./packages/twenty-server /app/packages/twenty-server
RUN yarn workspaces focus twenty-emails twenty-server
RUN yarn

RUN npx nx reset
RUN npx nx run twenty-server:build:packageJson
RUN mv /app/packages/twenty-server/dist/package.json /app/packages/twenty-server/package.json
RUN yarn workspaces focus twenty-emails twenty-server
RUN npx nx run twenty-server:build
RUN rm -rf /app/node_modules

FROM node:18.17.1-alpine as twenty-server

COPY --from=twenty-server-build /app /app
WORKDIR /app

RUN yarn workspaces focus twenty-emails twenty-server

WORKDIR /app/packages/twenty-server

Expand Down

0 comments on commit 5e5ae0b

Please sign in to comment.