Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1 KB

README.md

File metadata and controls

43 lines (28 loc) · 1 KB

Deploying Django to Heroku With Docker

Codacy Badge

Uses the Container Registry approach for Heroku deployments.

Want to learn how to build this

Want to use this project

Development

Run locally:

docker build -t web:latest .
$ docker run -d --name data-africa -e "PORT=8765" -e "DEBUG=1" -p 8007:8765 web:latest

Verify http://localhost:8007 works as expected:

{
  "ping": "pong!"
}

Stop then remove the running container once done:

docker stop data-africa
$ docker rm data-africa

Production

$ docker build -t registry.heroku.com/frozen-basin-50948/web .

docker push registry.heroku.com/frozen-basin-50948/web

$ heroku container:release -a frozen-basin-50948 web