I have a Flask application that I am attempting to deploy onto Heroku. I have two problems that are stopping me from deploying. The first is that when I run the command heroku local
. I am taken to my localhost:5000/
page in which everything looks fine until I head to my /admin/login
page. The second is that heroku can't seem to detect the heroku/python
build pack. I don't know if the first problem is related to the second.
For that page I get a 500 error
and additionally there are no logs on the command line to view. All I see is this:
⇒ heroku local
forego | starting web.1 on port 5000
web.1 | [2015-12-03 12:31:42 -0500] [7200] [INFO] Starting gunicorn 19.4.1
web.1 | [2015-12-03 12:31:42 -0500] [7200] [INFO] Listening at:
http://0.0.0.0:5000 (7200)
web.1 | [2015-12-03 12:31:42 -0500] [7200] [INFO] Using worker: sync
web.1 | [2015-12-03 12:31:42 -0500] [7203] [INFO] Booting worker with pid: 7203
I can't determine if I'm supposed to see something on that page or if my Procfile is somehow not allowing it. Anyways, this is my directory structure:
~/Desktop/project_directory
/venv
/ static
/images, javascript, css, etc.
/ templates
- html files
/ bin
/ include
/ migrations
- Procfile
- alembic.ini
- blackduck_directory.py
- blackduck_directory.pyc
- pip-selfcheck.json
- requirements.txt
- runtime.txt
This is the content of my Procfile
:
web: gunicorn blackduck_directory:app --log-file=-
This is my runtime.txt:
python-2.7.10
This is my requirements.txt:
alembic==0.7.7
bcrypt==2.0.0
blinker==1.4
cffi==1.3.1
dominate==2.1.16
Flask==0.10.1
Flask-Admin==1.3.0
Flask-Bcrypt==0.7.1
Flask-Login==0.3.2
Flask-Mail==0.9.1
Flask-Migrate==1.6.0
Flask-Principal==0.4.0
Flask-Script==2.0.5
Flask-SQLAlchemy==2.1
Flask-WTF==0.12
gunicorn==19.4.1
itsdangerous==0.24
Jinja2==2.8
Mako==1.0.2
MarkupSafe==0.23
passlib==1.6.5
Pillow==3.0.0
psycopg2==2.6.1
pycparser==2.14
python-editor==0.4
six==1.10.0
SQLAlchemy==1.0.9
visitor==0.1.2
Werkzeug==0.11.2
wheel==0.24.0
WTForms==2.0.2
There is a question on stackoverflow Heroku with Flask-Admin. Has anyone encountered this problem? Otherwise running python blackduck_directory.py
works properly.