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.git
Install Python 3
apt install python3
Install pipenv
pip install pipenv
Install dependencies
pipenv install
Activate python virtual environment
pipenv shell
Go to the project directory
cd api/
Install dependencies Start the server
python manage.py runserver
Clone the project
git clone https://github.com/Hellrungj/python_heroku_api.git
Install Docker
Install the app from https://docs.docker.com/get-docker/
Build Image
docker build -t django-heroku-app
Run the Container:
docker run -it -e "HOST:0.0.0.0" -e "PORT=8000" -e "DEBUG=0" -p 8000:8000 django-heroku-app