quivr/backend
Mohamed Messaad 71d4a63a17
feat(docker): use multi-stage Docker builds for smaller images (#1614)
# Description

Currently, the production Docker images are very large, sitting at 4.17
GB for the frontend image, and 3.49 GB for backend images. This change
adds multi-stage builds, to optimize the image sizes, which results in
the following improvements:

- frontend image size: 4.17 GB -> 1.64 GB
- backend image size: 3.49 GB -> 1.71 GB

I hope this is appropriate as there is no open issue for this that I
know of.
I implemented this change and tested it locally, and would be glad to
discuss this and open an issue if necessary.

## Checklist before requesting a review

Please delete options that are not relevant.

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented hard-to-understand areas
- [x] New and existing unit tests pass locally with my changes

## Screenshots (if appropriate):
Image sizes before:
<img width="1416" alt="image"
src="https://github.com/StanGirard/quivr/assets/8296549/fcbb020f-8165-4549-ae30-823318691ec6">

Image sizes after:
<img width="1416" alt="image"
src="https://github.com/StanGirard/quivr/assets/8296549/d3f43c78-be26-4c38-9d23-9c1b0e9e37f2">
2023-11-13 10:13:56 +01:00
..
.vscode feat: ⚙️🐞 configure debugger for the backend (#1345) 2023-10-09 15:23:13 +02:00
auth refactor: fix bad smells (#1399) 2023-10-30 10:18:04 +01:00
crawl test: skip failing linter tests (#1036) 2023-08-25 12:03:13 +02:00
llm feat: allow users to chat with apis (#1612) 2023-11-09 16:58:51 +01:00
loaders feat: 🎸 telegram (#1555) 2023-11-01 22:09:04 +01:00
middlewares feat(refacto): changed a bit of things to make better dx (#984) 2023-08-19 13:32:16 +02:00
models feat: allow users to chat with apis (#1612) 2023-11-09 16:58:51 +01:00
parsers fix: 🐛 parsers 2023-11-05 22:43:46 +01:00
repository feat: allow users to chat with apis (#1612) 2023-11-09 16:58:51 +01:00
routes feat: allow users to chat with apis (#1612) 2023-11-09 16:58:51 +01:00
supabase/functions/add-new-email feat(refacto): changed a bit of things to make better dx (#984) 2023-08-19 13:32:16 +02:00
tests fix: update backend tests (#992) 2023-08-21 12:45:32 +02:00
utils feat: 🎸 telegram 2023-11-01 22:33:47 +01:00
vectorstore feat: 🎸 telegram 2023-11-01 22:33:47 +01:00
celery_task.py fix(aws): fixed cpu 1 2023-09-21 11:26:58 +02:00
celery_worker.py feat: add a cron to remove onboarding more than 7 days (#1397) 2023-10-16 16:11:34 +02:00
chat_service.py refactor: fix bad smells (#1399) 2023-10-30 10:18:04 +01:00
crawl_service.py refactor: fix bad smells (#1399) 2023-10-30 10:18:04 +01:00
Dockerfile feat(docker): use multi-stage Docker builds for smaller images (#1614) 2023-11-13 10:13:56 +01:00
logger.py feat(refacto): changed a bit of things to make better dx (#984) 2023-08-19 13:32:16 +02:00
main.py refactor: fix bad smells (#1399) 2023-10-30 10:18:04 +01:00
pyrightconfig.json feat(refacto): changed a bit of things to make better dx (#984) 2023-08-19 13:32:16 +02:00
requirements.txt feat: allow users to chat with apis (#1612) 2023-11-09 16:58:51 +01:00
upload_service.py refactor: fix bad smells (#1399) 2023-10-30 10:18:04 +01:00