-
Notifications
You must be signed in to change notification settings - Fork 43
/
fabfile.py
31 lines (23 loc) · 897 Bytes
/
fabfile.py
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
from fabric.api import *
from fabric.colors import green, yellow, red
from fabric.contrib.project import rsync_project
from fabric.contrib.console import confirm
from contextlib import contextmanager as _contextmanager
# Default release is 'current'
env.release = 'current'
rsync_excludes = ("*_local.py", "*.pyc", ".git/*", "*node_modules*", "composer.phar", "adminer.php")
def production():
env.settings = 'production'
env.user = 'razorflow'
env.hosts = ['examples.razorflow.com']
def deploy():
upload_app ()
print(green("##################################################################"))
print(green("## Finished deploy without any known errors. Please still test. ##"))
print(green("##################################################################"))
def upload_app ():
rsync_project(
remote_dir= "/home/razorflow/rfdev",
local_dir=".",
exclude=rsync_excludes,
)