-
Notifications
You must be signed in to change notification settings - Fork 0
/
fabcontext.py
58 lines (47 loc) · 2.11 KB
/
fabcontext.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
import hashlib,random
context = {}
# project changeable values
context['proj'] = "mendigames"
proj = context['proj']
context['github_username'] = "xvaldetaro"
context['github_email'] = "[email protected]"
context['git_url'] = "[email protected]:%s/%s.git" % (context['github_username'], proj)
context['domains'] = ["www.%s.com.br" % proj,"%s.com.br" % proj, "www.%s.com" % proj,"%s.com" % proj]
context['proxy_port'] = "8000"
# Development machine configs
context['dev_proj_dir'] = '/home/xande/apps/%s' % proj
context['dev_ssh_dir'] = '/home/xande/.ssh'
context['ssh_pem'] = "%s/key.pem" % context['dev_ssh_dir']
context['ssh_github_priv_key'] = "%s/github" % context['dev_ssh_dir']
context['dev_env_file'] = '/home/xande/confs/%s/production.sh' % proj
# Remote machine changeable values
context['user'] = "xande"
context['hosts'] = ["localhost"]
# DB access
context['db'] = 'mysql'
context['db_endpoint'] = 'localhost'
context['db_port'] = '3306'
context['db_root'] = 'root'
# This is NOT the root password (which you will type when prompted).
# This is the desired project user db password.
context['db_password'] = '1234'
#uncomment to provide ssl:
#context['ssl_port'] = "8443"
# machine fixed values
context['home_dir'] = "/home/%s" % context['user']
base_dir = context['home_dir']
context['apps_dir'] = "%s/apps" % base_dir
context['venvs_dir'] = "%s/venvs" % base_dir
context['confs_dir'] = "%s/confs" % base_dir
context['logs_dir'] = "%s/logs" % base_dir
context['statics_dir'] = "%s/statics" % base_dir
# project fixed values
context['proj_app_dir'] = "%s/%s" % (context['apps_dir'],context['proj'])
context['proj_venv_dir'] = "%s/%s" % (context['venvs_dir'],context['proj'])
context['proj_conf_dir'] = "%s/%s" % (context['confs_dir'],context['proj'])
context['proj_log_dir'] = "%s/%s" % (context['logs_dir'],context['proj'])
context['ssh_dir'] = "/home/%s/.ssh" % context['user']
# uncomment to provide local statics
context['proj_static_dir'] = "%s/%s" % (context['statics_dir'],context['proj'])
context['launch_cmd'] = "%s/launch.sh" % context['proj_app_dir']
context['secret_key'] = hashlib.md5(str(random.randint(1,9999999))).hexdigest()