A quickstart api using docker and django that can be deploy easily to Heroku
To deploy this project see Deploying with Docker on Heroku documentation.
Docker Env
HOST: '0.0.0.0'PORT: '8000'DEBUG: 0
Clone the project
git clone https://github.com/Hellrungj/python_heroku_api.gitInstall Python 3
apt install python3Install pipenv
pip install pipenvInstall dependencies
pipenv installActivate python virtual environment
pipenv shellGo to the project directory
cd api/Install dependencies Start the server
python manage.py runserverClone the project
git clone https://github.com/Hellrungj/python_heroku_api.gitInstall Docker
Install the app from https://docs.docker.com/get-docker/Build Image
docker build -t django-heroku-appRun the Container:
docker run -it -e "HOST:0.0.0.0" -e "PORT=8000" -e "DEBUG=0" -p 8000:8000 django-heroku-app