theo/machines/theo-server/deploy/theo-common/rattail.conf.mako

107 lines
2.6 KiB
Plaintext
Raw Normal View History

2020-09-19 18:55:17 -05:00
## -*- mode: conf; -*-
<%text>############################################################</%text>
#
# core config for Theo
#
<%text>############################################################</%text>
[theo]
% if env.theo_integrates_with == 'corepos':
integrate_corepos = true
% elif env.theo_integrates_with == 'catapult':
integrate_catapult = true
% endif
## begin corepos
% if env.theo_integrates_with == 'corepos':
<%text>##############################</%text>
# CORE-POS
<%text>##############################</%text>
[corepos]
office.url = ${env.corepos_office_url}
[corepos.api]
url = ${env.corepos_api_url}
[corepos.db.office_op]
default.url = mysql+mysqlconnector://${env.corepos_db_username}:${env.corepos_db_password}@${env.corepos_db_host}/${env.corepos_db_name_office_op}
default.pool_recycle = 3600
## end corepos
% endif
## begin catapult
% if env.theo_integrates_with == 'catapult':
<%text>##############################</%text>
# Catapult
<%text>##############################</%text>
[catapult.db]
default.url = catapult://${env.catapult_odbc_username}:${env.catapult_odbc_password}@catapult-default
## end catapult
% endif
<%text>##############################</%text>
# rattail
<%text>##############################</%text>
[rattail]
production = ${'true' if production else 'false'}
appdir = ${envroot}/app
datadir = ${envroot}/app/data
batch.files = ${envroot}/app/batch
workdir = ${envroot}/app/work
runas.default = theo
[rattail.config]
include = /etc/rattail/rattail.conf
usedb = true
preferdb = true
[rattail.db]
default.url = postgresql://rattail:${env.password_postgresql_rattail}@localhost/${dbname}
versioning.enabled = true
[rattail.mail]
send_emails = true
default.prefix = [Theo]
[rattail.upgrades]
command = sudo ${envroot}/app/upgrade-wrapper.sh --verbose
files = ${envroot}/app/data/upgrades
<%text>##############################</%text>
# alembic
<%text>##############################</%text>
[alembic]
script_location = rattail.db:alembic
% if env.theo_integrates_with == 'corepos':
version_locations = rattail_corepos.db:alembic/versions rattail.db:alembic/versions
% elif env.theo_integrates_with == 'catapult':
version_locations = rattail_onager.db:alembic/versions rattail.db:alembic/versions
% else:
version_locations = rattail.db:alembic/versions
% endif
<%text>##############################</%text>
# logging
<%text>##############################</%text>
[handler_file]
args = ('${envroot}/app/log/rattail.log', 'a', 'utf_8')
[handler_email]
args = ('localhost', '${env.email_default_sender}', ${env.email_default_recipients}, "[Theo${'' if production else ' (stage)'}] Logging")