-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.txt
43 lines (30 loc) · 1.26 KB
/
commands.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
## Deploy
git add .
git commit -m "message"
git push heroku master
heroku run python manage.py flush
heroku run python manage.py runscript initialize_data
# update all
heroku run python manage.py runscript update_all
## Heroku backup restore (https://devcenter.heroku.com/articles/heroku-postgres-import-export)
# heroku postgres dump/backup and download
heroku pg:backups:capture
heroku pg:backups:download
# heroku postgres restore from dump/backup
aws s3 presign s3://your-bucket-address/your-object
heroku pg:backups:restore '<SIGNED URL>' DATABASE_URL
## Miscellenious
# initialize data
python manage.py runscript initialize_data
# game week update
python manage.py runscript gw_update --script-args <gameweek> <update_managers>
# manager gw update
python manage.py runscript gw_manager_update --script-args <gameweek>
# update players with the new data
python manage.py runscript update_players
# create mgw objects for already created managers
python manage.py runscript mgw_create
# postgres dump the db named mydb
pg_dump -U postgres -W -F t mydb > E:\Projects\Fantasy_Auction\deployment\mydb_backup20210904_0422_gw1.tar
# now create a backup db then execute
pg_restore -c -U postgres -d mydb_backup E:\Projects\Fantasy_Auction\deployment\mydb_backup20210904_0422_gw1.tar