Skip to content

Commit

Permalink
Add note about updating pipenv requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
philgyford committed Oct 6, 2018
1 parent 5d3afb8 commit 07a8053
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This is my example Django setup using Docker for local development.
It's taken me a while to piece the Docker stuff together and I'm definitely not
confident that it's ideal. But, so far, it seems to work.

Many of the notes below are so I don't forget anything; some might be useful
to others too.


## Start it

Expand Down Expand Up @@ -89,6 +92,30 @@ Or, just for the `web` container:
docker-compose build web
## Update python requirements with pipenv
I'm not sure the best way to do this, so here's what I've done when wanting to
update a pipenv requirement:
1. On my local machine (not in the Docker container) create a pipenv and install requirements:
pipenv install
2. Make any updates to requirements, e.g.:
pipenv update Django
That should update `Pipfile` and `Pipfile.lock`.
3. Delete this pipenv virtualenv:
pipenv --rm
4. Re-build the Docker `web` container, which will take noticed of the `Pipfile` changes (`docker-compose stop` first if it's currently running):
docker-compose build web
## Keeping Docker tidy
It seems easy to end up with loads of unused images, containers and volumes,
Expand Down

0 comments on commit 07a8053

Please sign in to comment.