Skip to content

Commit 347d594

Browse files
renzonrenzon
authored andcommitted
Added initial setup to Heroku
close 51 Added Procfile with migration on release Added Postgresql driver Added Postgresql migrations tests on Travis CI
1 parent 7b655e5 commit 347d594

5 files changed

Lines changed: 22 additions & 3 deletions

File tree

.travis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
language: python
22
python:
33
- 3.6
4+
5+
services:
6+
postgresql
7+
8+
addons:
9+
postgresql: "9.5"
10+
411
install:
512
- cp contrib/settings-sample.yml settings.yml
6-
- pip install -r requirements-dev.txt codecov
13+
- pip install -q -r requirements-dev.txt codecov
14+
15+
before_script:
16+
- psql -c "CREATE DATABASE testdb;" -U postgres
17+
- python manage.py migrate --noinput
18+
- python manage.py collectstatic
19+
720
script:
821
- flake8 .
922
- pytest --cov=pythonpro
23+
1024
after_success:
1125
- codecov

Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: python manage.py migrate --noinput
2+
web: gunicorn pythonpro.wsgi --log-file -

contrib/settings-sample.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DYNACONF:
2-
DEBUG: False
2+
DEBUG: True
33
SECRET_KEY: 'put a real secret here'
44
# DATABASE_URL:
55
ALLOWED_HOSTS: ['127.0.0.1', .localhost, .herokuapp.com]

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ pytz==2017.2
88
dynaconf==0.5.2
99
python_box==3.1.1
1010
six==1.11.0
11-
PyYAML==3.12
11+
PyYAML==3.12
12+
gunicorn==19.7.1
13+
psycopg2==2.7.3.2

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.6.2

0 commit comments

Comments
 (0)