From 268535535312c66667fda6f7ce7e918b70c42362 Mon Sep 17 00:00:00 2001 From: Gabriel Bustamante Date: Fri, 31 May 2024 14:53:19 -0500 Subject: [PATCH] Update the instructions to run the product details rebuild locally (#1490) --- README.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ab0c9465b..92fef8f9d 100644 --- a/README.rst +++ b/README.rst @@ -82,11 +82,21 @@ product-details rely on a `pulse queue `__. Although, there's a way to by-pass the need for a pulse queue. -1. ``docker-compose run api bash`` +1. Define the container in which the api application is running -2. ``shipit_rebuild_product_details --database-url="postgresql://shipituser:shipitpassword@db/shipitdb" --channel development`` +:: + + export SHIPIT_API_CONTAINER="shipit-api-1" + +2. Access the Docker container's interactive shell + +:: + + docker exec -it "$SHIPIT_API_CONTAINER" /bin/bash + +3. ``poetry run shipit_rebuild_product_details --database-url="postgresql://shipituser:shipitpassword@db/shipitdb" --channel development`` -3. This will ask you for some GitHub crendentials. You can provide them if you want to update https://github.com/mozilla-releng/product-details. That said, you can also ``Ctrl+C`` and inspect the content of `/tmp/product-details` in the docker container. Changes are done here before they pushed to the git repo. +4. This will ask you for some GitHub crendentials. You can provide them if you want to update https://github.com/mozilla-releng/product-details. That said, you can also ``Ctrl+C`` and inspect the content of `/tmp/product-details` in the docker container. Changes are done here before they pushed to the git repo. ⚠️ If you decide to provide GitHub crendentials, remember that GitHub accounts that enabled 2-factor-authentication have to provide a GitHub token instead of their regular password. Instructions to generate a token are found above. This time tough, grant the ``public_repo`` scope.