1.2 KiB
HOWTO Update Python Dependencies
========================
-
Check the Pipfile for pinned dependencies and manually adjust the version numbers
-
Run
docker-compose stop
to spin down the current containers and images so we can start afresh -
Run
cd src docker-compose run app bash -c "pipenv lock && pipenv requirements > requirements.txt"
This will generate a new Pipfile.lock and create a new requirements.txt. It will not install anything.
It is necessary to use
bash -c
becauserun pipenv requirements
will not recognize that it is running non-interactively and will include garbage formatting characters.The requirements.txt is used by Cloud.gov. It is needed to work around a bug in the CloudFoundry buildpack version of Pipenv that breaks on installing from a git repository.
-
Run
docker-compose build
to build a new image for local development with the updated dependencies.The reason for de-coupling the
build
andlock
steps is to increase consistency between builds--a run ofbuild
will always get exactly the dependencies listed inPipfile.lock
, nothing more, nothing less.