Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Heroku deployment of example_app. #506

Merged
merged 13 commits into from
Aug 4, 2016
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: cd example_app && python manage.py runserver 0.0.0.0:$PORT --noreload
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
[![build-status-badge]][build-status]
[![codecov](https://codecov.io/gh/marcgibbons/django-rest-swagger/branch/master/graph/badge.svg)](https://codecov.io/gh/marcgibbons/django-rest-swagger)
[![pypi-version]][pypi]
[![Dependency Status](https://www.versioneye.com/user/projects/579cb582aa78d50051183c0e/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/579cb582aa78d50051183c0e)


[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)


####An API documentation generator for Swagger UI and Django REST Framework

Expand Down
13 changes: 13 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Django REST Swagger Example",
"description": "An example of Django REST Swagger using the Django REST Framework Tutorial app",
"repository": "https://github.com/marcgibbons/django-rest-swagger",
"keywords": ["django", "swagger", "rest", "framework"],
"env": {
"HEROKU": "1",
"DISABLE_COLLECTSTATIC": "1"
},
"scripts": {
"postdeploy": "python example_app/manage.py migrate --noinput && python example_app/manage.py loaddata users"
}
}
17 changes: 14 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,20 @@ urlpatterns = [


## Example app
An example based on the [Django REST Tutorial](http://www.django-rest-framework.org/tutorial/1-serialization/)
ships with the project and can be optionally run with the included
[Docker](https://www.docker.com/) container.
An example based on the [Django REST Tutorial](http://www.django-rest-framework.org/tutorial/1-serialization/) ships with the project. It and can be optionally locally using Docker, or deployed for free on heroku.

### Deploy with Heroku
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/marcgibbons/django-rest-framework)

Log in credentials are:
```
username: amy
password: amy
```

### Docker Instructions

Ensure [Docker](https://www.docker.com/) Docker is installed on your system.

First, clone the repository:

Expand Down
1 change: 0 additions & 1 deletion example_app/Procfile

This file was deleted.

21 changes: 13 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Django==1.9.7
djangorestframework==3.4.0
Django==1.9.8
djangorestframework==3.4.1
coreapi==1.32.0
openapi-codec==1.0.0
tox==2.3.1
Pygments==2.0.2
Markdown==2.6.3
simplejson==3.8.2

mkdocs==0.15.3
pylint==1.6.3
coverage==4.1
# Testing
tox==2.3.1
pylint==1.6.4
coverage==4.2
ipdb==0.10.1

# Docs
mkdocs==0.15.3

# Heroku
dj_database_url==0.4.1
psycopg2==2.6.1
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-3.5.2