openfoodfacts-server
openfoodfacts-server copied to clipboard
Update Product Opener to fetch Redis and MongoDB Dependencies from openfoodfacts-shared-services repo
Description
We want to move Redis and MongoDB into their own repo so that other projects that depend on these, like off-query, can just pull in these dependencies without needing the whole of Product Opener.
Acceptance criteria
Can develop on a related project, like off-query, without running ProductOpener locally.
What would a demo look like
With a clean directory tree, clone off-query and make deps to show that MongoDB and Redis are available.
Notes
At the moment MongoDB exposes the html/data directory for imports and its data/db directory for running scripts. It is proposed that the scripts that PO needs should now run in Perl (create_mongodb_indexes) and that the full product import should be moved into the shared_services repo.
Should we also make a test SMTP server a shared service?
Tasks
- [x] Create shared-services repo with MongoDB and Redis containers
- [x] Update PO create_mongodb_indexes to run without direct access to a MongoDB volume
- [ ] Move the import_prod_data target to shared_services (PO version can call out to this)
- [x] Remove MongoDB and Redis container definitions from PO (except for when running integration tests)
- [ ] Move GitHub action to deploy MongoDB from PO to shared_services
- [ ] Update off-query to use shared_services for MongDB and Redis
- [ ] Update off-auth to use shared_services for Redis
- [ ] Add branch protection to openfoodfacts-shared-services