File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
from fabric .api import run , env
2
2
3
3
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 ()
5
12
6
13
7
14
def deploy ():
8
- stop ()
9
- pull ()
10
- build ()
11
- start ()
15
+ _stop ()
16
+ _pull ()
17
+ _start ()
12
18
13
19
14
- def pull ():
20
+ def _pull ():
15
21
# Pull updates from the central repo
16
22
run ("cd /home/comeo/ && git fetch && git reset --hard origin/master" )
17
23
18
24
19
- def start ():
25
+ def _start ():
20
26
# start all docker-compose services
21
27
# migrations will be applied before django starts up
22
28
run ("cd /home/comeo/Docker/lab && make run-detached" )
23
29
24
30
25
- def build ():
31
+ def _build ():
26
32
# Rebuild django container, to install there new pip reqs
27
33
run ("cd /home/comeo/Docker/lab && make build" )
28
34
29
35
30
- def stop ():
36
+ def _stop ():
31
37
# Stop running containers
32
38
run ("cd /home/comeo/Docker/lab && make stop" )
You can’t perform that action at this time.
0 commit comments