This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
fabfile.py
78 lines (61 loc) · 1.68 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import os
from tools.fablib import *
"""
Base configuration
"""
env.project_name = 'oneliner'
env.database_password = ''
env.site_media_prefix = "static"
env.path = '/home/newsapps/sites/%(project_name)s' % env
env.env_path = '/home/newsapps/.virtualenvs/%(project_name)s' % env
env.repo_path = '%(path)s' % env
env.repository_url = "git@github.com:INN/one-liner.git"
# Varnish cache servers to purge
env.cache_servers = []
# Setup celery
env.use_celery = False
# Environments
def production():
"""
Work on production environment
"""
env.settings = 'production'
env.hosts = [
os.environ['ONELINER_PROD_HOST'],
]
env.roledefs = {
'app': [
os.environ['ONELINER_PROD_HOST'],
],
'admin': [
os.environ['ONELINER_PROD_HOST'],
]
}
env.user = 'newsapps'
env.site_domain = 'oneliner.inn.org'
env.db_root_user = os.environ['MYSQL_PRODUCTION_ROOT_USER']
env.db_root_pass = os.environ['MYSQL_PRODUCTION_ROOT_PASSWORD']
env.db_type = 'mysql'
env.db_host = 'localhost'
env.database_password = os.environ['ONELINER_PROD_DB_PASSWORD']
env.django_settings_module = '%(project_name)s.production_settings' % env
def staging():
"""
Work on staging environment
"""
env.settings = 'staging'
env.hosts = []
env.roledefs = {
'app': [],
'worker': [],
'admin': []
}
env.user = 'newsapps'
env.s3_bucket = ''
env.site_domain = ''
env.db_root_user = ''
env.db_root_pass = ''
env.db_type = 'mysql'
env.db_host = ''
env.database_password = ''
env.django_settings_module = '%(project_name)s.staging_settings' % env