Skip to content

Commit be0aede

Browse files
committed
fabfile update - build skipping
1 parent 5e6de8f commit be0aede

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

fabfile.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
from fabric.api import run, env
22

33

4-
env.host_string = "[email protected]"
4+
env.host_string = "[email protected]"
5+
6+
7+
def deploy_and_rebuild():
8+
_stop()
9+
_pull()
10+
_build()
11+
_start()
512

613

714
def deploy():
8-
stop()
9-
pull()
10-
build()
11-
start()
15+
_stop()
16+
_pull()
17+
_start()
1218

1319

14-
def pull():
20+
def _pull():
1521
# Pull updates from the central repo
1622
run("cd /home/comeo/ && git fetch && git reset --hard origin/master")
1723

1824

19-
def start():
25+
def _start():
2026
# start all docker-compose services
2127
# migrations will be applied before django starts up
2228
run("cd /home/comeo/Docker/lab && make run-detached")
2329

2430

25-
def build():
31+
def _build():
2632
# Rebuild django container, to install there new pip reqs
2733
run("cd /home/comeo/Docker/lab && make build")
2834

2935

30-
def stop():
36+
def _stop():
3137
# Stop running containers
3238
run("cd /home/comeo/Docker/lab && make stop")

0 commit comments

Comments
 (0)