-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
fabfile.py
49 lines (41 loc) · 1.37 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from tools.fablib import *
from fabric.api import task
"""
Base configuration
"""
env.project_name = 'mwcir'
env.hosts = ['localhost', ]
env.sftp_deploy = True # needed for wpengine
env.domain = 'investigatemidwest.dev'
"""
Add HipChat info to send a message to a room when new code has been deployed.
"""
env.hipchat_token = ''
env.hipchat_room_id = ''
# Environments
@task
def production():
"""
Work on production environment
"""
env.settings = 'production'
env.hosts = [ os.environ[ 'MWCIR_PRODUCTION_SFTP_HOST' ], ] # ssh host for production.
env.user = os.environ[ 'MWCIR_PRODUCTION_SFTP_USER' ] # ssh user for production.
env.password = os.environ[ 'MWCIR_PRODUCTION_SFTP_PASSWORD' ] # ssh password for production.
env.domain = 'mwcir.wpengine.com'
env.port = '2222'
@task
def staging():
"""
Work on staging environment
"""
env.settings = 'staging'
env.hosts = [ os.environ[ 'MWCIR_STAGING_SFTP_HOST' ], ] # ssh host for production.
env.user = os.environ[ 'MWCIR_STAGING_SFTP_USER' ], # ssh user for production.
env.password = os.environ[ 'MWCIR_STAGING_SFTP_PASSWORD' ] # ssh password for production.
env.domain = 'mwcir.staging.wpengine.com'
env.port = '2222'
try:
from local_fabfile import *
except ImportError:
pass