-
Notifications
You must be signed in to change notification settings - Fork 0
/
Installation Guide
53 lines (32 loc) · 1.81 KB
/
Installation Guide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Note:
Don't rely on the video tutorial for deploying your flask api on heroku.
For example you can't use the alternative of pip, conda, right now.
You can get all the help needed to understand how heroku works from the official documentation:
https://devcenter.heroku.com/categories/python-support
e.g you can't use conda instead of pip and can't name file any other then requirements.txt
to deploy your app on heroku.
If you have requirements.txt file in your project or app then heroku would run the command:
$ pip install -r requirements.txt
General Instruction:
1. Create pip envrionment (not conda)
2. Create your app (flask_api.py, utils.py)
3. Create Procfile (as an entry point)
4. Export requirements.txt ($ pip freeze > requirements.txt)
5. Login to heroku ($ heroku login -i && heroku login)
6. Initialize git repo, add files and commit
7. Create heroku app ($ heroku create APP_NAME)
8. Update heroku stack ($ heroku stack, $ heroku stack:set heroku-18)
9. Push your repo ($ git push heroku master) -> If unsuccessfull then remove unnecessary package from requirements.txt
10. Copy the url provided in the git push logs to test server with postman
Resources:
1. https://devcenter.heroku.com/categories/python-support
2. https://devcenter.heroku.com/articles/getting-started-with-python#deploy-the-app
3. https://devcenter.heroku.com/articles/python-support#supported-runtimes
4. https://devcenter.heroku.com/articles/heroku-18-stack
5. https://devcenter.heroku.com/articles/python-gunicorn
Heroku Debugging:
$ heroku logs --tail
Solcast:
1. Remember not to create Business or Commercial Account on Solcast. Simply create a student account, the last option.
Otherwise your account will go for verification which will never be verified. You can use student account
instantly without delay and download upto two dataset.