Add CORE Office URL to deployed Corporal config
This commit is contained in:
parent
071bc7b011
commit
45c6af56b2
|
@ -13,7 +13,8 @@ from corporal.fablib import deploy_common
|
||||||
|
|
||||||
def bootstrap_corporal_app(c, env, envname='corporal', user='rattail',
|
def bootstrap_corporal_app(c, env, envname='corporal', user='rattail',
|
||||||
port=7900, sitename=None, stage=False,
|
port=7900, sitename=None, stage=False,
|
||||||
coredir=None, lanes=None):
|
coredir=None, lanes=None,
|
||||||
|
core_office_url=None):
|
||||||
"""
|
"""
|
||||||
Create a virtual environment for use with a Corporal app.
|
Create a virtual environment for use with a Corporal app.
|
||||||
"""
|
"""
|
||||||
|
@ -104,7 +105,8 @@ def bootstrap_corporal_app(c, env, envname='corporal', user='rattail',
|
||||||
deploy_common(c, 'corporal/rattail.conf.mako', '{}/rattail.conf'.format(appdir),
|
deploy_common(c, 'corporal/rattail.conf.mako', '{}/rattail.conf'.format(appdir),
|
||||||
use_sudo=True, owner=user, mode='0600',
|
use_sudo=True, owner=user, mode='0600',
|
||||||
context={'env': env, 'envdir': envdir, 'dbname': dbname,
|
context={'env': env, 'envdir': envdir, 'dbname': dbname,
|
||||||
'production': production, 'lanes': lanes})
|
'production': production, 'lanes': lanes,
|
||||||
|
'core_office_url': core_office_url})
|
||||||
if not exists(c, '{}/quiet.conf'.format(appdir)):
|
if not exists(c, '{}/quiet.conf'.format(appdir)):
|
||||||
c.sudo("bash -lc 'workon {} && cdvirtualenv app && rattail make-config -T quiet'".format(envname),
|
c.sudo("bash -lc 'workon {} && cdvirtualenv app && rattail make-config -T quiet'".format(envname),
|
||||||
user=user)
|
user=user)
|
||||||
|
|
|
@ -7,6 +7,11 @@
|
||||||
<%text>############################################################</%text>
|
<%text>############################################################</%text>
|
||||||
|
|
||||||
|
|
||||||
|
[corepos]
|
||||||
|
% if core_office_url:
|
||||||
|
office.url = ${core_office_url}
|
||||||
|
% endif
|
||||||
|
|
||||||
[corepos.db.office_op]
|
[corepos.db.office_op]
|
||||||
default.url = mysql+mysqlconnector://${env.username_mysql_coreserver}:${env.password_mysql_coreserver}@localhost/core_op
|
default.url = mysql+mysqlconnector://${env.username_mysql_coreserver}:${env.password_mysql_coreserver}@localhost/core_op
|
||||||
default.pool_recycle = 3600
|
default.pool_recycle = 3600
|
||||||
|
|
Loading…
Reference in a new issue