Skip to content

Commit

Permalink
chore(deployment):setup and deploy base app to heroku
Browse files Browse the repository at this point in the history
- Deploy base to heroku
- Configure whitenoise
- Setup staging pipeline
- Update docstring links from django 1.10 to 2.1

[Starts #162949206]
  • Loading branch information
kwanj-k committed Jan 10, 2019
1 parent 3c48a88 commit 287961a
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ __pycache__/
# C extensions
*.so

#vscode files
*.vscode

# Distribution / packaging
.Python
env/
Expand Down
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn authors.wsgi --log-file -
5 changes: 5 additions & 0 deletions authors/apps/authentication/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.contrib import admin

from .models import User

admin.site.register(User)
2 changes: 1 addition & 1 deletion authors/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.getenv('DATABASE_URL')
'NAME':os.getenv('DATABASE_URL')
}
}
DATABASES['default']= dj_database_url.config()
Expand Down
Empty file added authors/staticfiles/main.css
Empty file.
4 changes: 1 addition & 3 deletions authors/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""authors URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
Expand All @@ -20,6 +20,4 @@
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('authors.apps.authentication.urls', namespace='authentication')),

]

2 changes: 1 addition & 1 deletion authors/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""

import os
Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Django==2.1.4
dj-database-url==0.5.0
Django==2.1.4
django-cors-middleware==1.3.1
django-extensions==2.1.4
djangorestframework==3.9.0
gunicorn==19.9.0
psycopg2==2.7.6.1
psycopg2-binary==2.7.6.1
PyJWT==1.7.1
six==1.12.0
psycopg2-binary==2.7.6.1
whitenoise==4.1.2
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-3.7.1

0 comments on commit 287961a

Please sign in to comment.