-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
45 lines (33 loc) · 1.08 KB
/
notes.txt
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
pip install virtualenv
mkdir smule-heroku
cd smule-heroku
git init
virtualenv venv
cd venv
cd Scripts
activate
pip install dash
pip install gunicorn
pip freeze > requirements.txt
cd ..
git add app.py
git add Procfile
#procfile contains: "web: gunicorn app:server --log-file=-"
git add requirements.txt
heroku create <appname>
git add .
git commit -m "message"
git push heroku master
heroku ps:scale web=1
for selenium:
heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-chromedriver
heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-google-chrome
heroku config:set GOOGLE_CHROME_BIN=app/.apt/usr/bin/google_chrome
heroku config:set CHROMEDRIVER_PATH=app/.chromedriver/bin/chromedriver
in the code:
GOOGLE_CHROME_BIN = '/app/.apt/usr/bin/google_chrome'
CHROMEDRIVER_PATH = '/app/.chromedriver/bin/chromedriver'
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--no-sandbox')
chrome_options.binary_location = GOOGLE_CHROME_PATH
browser = webdriver.Chrome(execution_path=CHROMEDRIVER_PATH, chrome_options=chrome_options)