https://github.com/hellrungj/python_heroku_api
quickstart_python_heroku_api
https://github.com/hellrungj/python_heroku_api
django django-rest-framework docker pytohn3
Last synced: about 2 months ago
JSON representation
quickstart_python_heroku_api
- Host: GitHub
- URL: https://github.com/hellrungj/python_heroku_api
- Owner: Hellrungj
- Created: 2021-09-16T02:01:18.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-16T02:34:06.000Z (almost 5 years ago)
- Last Synced: 2025-09-12T07:47:08.083Z (10 months ago)
- Topics: django, django-rest-framework, docker, pytohn3
- Language: CSS
- Homepage:
- Size: 1.83 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python_heroku_api
[](https://www.python.org/downloads/release/python-360/)
[](https://https://docker.com/)

A quickstart api using docker and django that can be deploy easily to Heroku
## Authors
- [@Hellrungj](https://www.github.com/Hellrungj)
## Deployment
To deploy this project see [Deploying with Docker on Heroku](https://devcenter.heroku.com/categories/deploying-with-docker) documentation.
## Environment Variables
Docker Env
- `HOST`: '0.0.0.0'
- `PORT`: '8000'
- `DEBUG`: 0
## Run Django Server Development Locally
Clone the project
```bash
git clone https://github.com/Hellrungj/python_heroku_api.git
```
Install Python 3
```bash
apt install python3
```
Install pipenv
```bash
pip install pipenv
```
Install dependencies
```bash
pipenv install
```
Activate python virtual environment
```bash
pipenv shell
```
Go to the project directory
```bash
cd api/
```
Install dependencies
Start the server
```bash
python manage.py runserver
```
## Run Docker Container Locally
Clone the project
```bash
git clone https://github.com/Hellrungj/python_heroku_api.git
```
Install Docker
```bash
Install the app from https://docs.docker.com/get-docker/
```
Build Image
```bash
docker build -t django-heroku-app
```
Run the Container:
```bash
docker run -it -e "HOST:0.0.0.0" -e "PORT=8000" -e "DEBUG=0" -p 8000:8000 django-heroku-app
```