-
Notifications
You must be signed in to change notification settings - Fork 1
/
.commands
44 lines (34 loc) · 947 Bytes
/
.commands
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
source env/bin/activate
function tmux () {
env/bin/tmuxp load .tmuxp.yaml
}
function update_requirements() {
pip-compile requirements.in
pip-compile requirements-dev.in
}
function deploy () {
ssh allmychanges.com bash <<EOF
cd production/allmychanges.com
git pull skate.svetlyak.ru:allmychanges.com
pip install -U -r requirements.txt
sudo -u www-data env/bin/python manage.py syncdb --migrate --settings=allmychanges.settings.production
sudo service allmychanges restart
sudo service allmychanges-rqworker restart
EOF
}
function manage () {
cat > /tmp/amch.command <<EOF
source env/bin/activate
env/bin/python manage.py $@ --settings=allmychanges.settings.production
EOF
sudo -u www-data bash /tmp/amch.command
}
function shell () {
manage shell_plus
}
function manage-dev () {
env/bin/python manage.py $@ --settings=allmychanges.settings.development
}
function shell-dev () {
manage-dev shell_plus
}