-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prod dockerfile to include package file and don't copy unneccesa…
…ry generated file (#597) * chore: backend prod Dockerfile * fix: remove unused config * fix: prod dockerfile to include package file * fix: dockerfile comment
- Loading branch information
1 parent
aa53e83
commit bdd26bf
Showing
5 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,19 +130,19 @@ RUN echo "SERVER_PORT=$SERVER_PORT" > .env \ | |
|
||
RUN rm -rf node_modules && yarn cache clean && yarn install | ||
RUN npm install -g [email protected] && fern -v && fern generate --log-level debug | ||
RUN mkdir -p /app/packages/backend/dist/generated && cp -r /app/packages/backend/generated/typescript /app/packages/backend/dist/generated | ||
RUN yarn workspace @revertdotdev/backend build | ||
RUN yarn workspace @revertdotdev/backend build:prod | ||
|
||
# remove development dependencies | ||
RUN npm prune --production | ||
|
||
FROM node:18-alpine AS runtime_image | ||
WORKDIR /app/ | ||
|
||
#copy from build image | ||
# copy from build image | ||
COPY --from=build_image /app/packages/backend/dist ./dist | ||
COPY --from=build_image /app/node_modules ./node_modules | ||
COPY --from=build_image /app/.env ./dist/.env | ||
COPY --from=build_image /app/.env ./.env | ||
COPY --from=build_image /app/packages/backend/package.json ./package.json | ||
|
||
WORKDIR /app/dist | ||
CMD ["node", "index.js"] | ||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,7 @@ README.md | |
packages/client | ||
packages/react | ||
packages/js | ||
packages/vue | ||
packages/vue | ||
generated | ||
dist | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters