matrix-dimension #43
4 changed files with 16 additions and 16 deletions
|
@ -6,7 +6,7 @@ After=network.target
|
|||
User=matrix-support
|
||||
Group=matrix-support
|
||||
Environment="NODE_ENV=production"
|
||||
ExecStart=/usr/bin/node /opt/matrix/matrix-dimension/build/app/index.js
|
||||
ExecStart=/usr/bin/node ${config['install_dir']}/build/app/index.js
|
||||
WorkingDirectory=${config['install_dir']}
|
||||
Restart=on-failure
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ widgetBlacklist:
|
|||
|
||||
database:
|
||||
# Where the database for Dimension is
|
||||
uri: "postgres://${node.metadata['matrix-dimension']['database']['user']}:${node.metadata['matrix-dimension']['database']['password']}@${node.metadata['matrix-dimension']['database'].get('host', 'localhost')}/${node.metadata['matrix-dimension']['database']['database']}"
|
||||
uri: "postgres://${node.metadata['matrix-dimension']['database']['user']}:${node.metadata['matrix-dimension']['database']['password']}@${node.metadata['matrix-dimension']['database'].get('host', 'localhost')}/${node.metadata['matrix-dimension']['database']['database']}"
|
||||
|
||||
# Where to store misc information for the utility bot account.
|
||||
botData: "${config['data_dir']}/dimension.bot.json"
|
||||
|
|
|
@ -2,8 +2,10 @@ repo.libs.tools.require_bundle(node, 'nodejs')
|
|||
|
||||
|
||||
directories = {
|
||||
node.metadata['matrix-dimension']['install_dir']: {},
|
||||
node.metadata['matrix-dimension']['data_dir']: {},
|
||||
node.metadata['matrix-dimension']['install_dir']: {
|
||||
'owner': 'matrix-support',
|
||||
'group': 'matrix-support',
|
||||
},
|
||||
}
|
||||
|
||||
git_deploy = {
|
||||
|
@ -22,6 +24,8 @@ git_deploy = {
|
|||
|
||||
files = {
|
||||
'{}/config/production.yaml'.format(node.metadata['matrix-dimension']['install_dir']): {
|
||||
'owner': 'matrix-support',
|
||||
'group': 'matrix-support',
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'config': node.metadata.get('matrix-dimension', {}),
|
||||
|
@ -44,8 +48,8 @@ files = {
|
|||
}
|
||||
|
||||
actions = {
|
||||
'matrix_dimenson_build': {
|
||||
'command': 'cd ' + node.metadata['matrix-dimension']['install_dir'] + ' && npm install && npm run build',
|
||||
'matrix_dimension_build': {
|
||||
'command': 'cd ' + node.metadata['matrix-dimension']['install_dir'] + ' && sudo -u matrix-support npm install && sudo -u matrix-support npm run build',
|
||||
'needs': {
|
||||
'pkg_apt:nodejs',
|
||||
},
|
||||
|
@ -59,7 +63,7 @@ actions = {
|
|||
svc_systemd = {
|
||||
'matrix-dimension': {
|
||||
'needs': {
|
||||
'action:matrix-dimension_build',
|
||||
'action:matrix_dimension_build',
|
||||
'file:{}/config/production.yaml'.format(node.metadata['matrix-dimension']['install_dir']),
|
||||
'postgres_db:matrix-dimension',
|
||||
'postgres_role:matrix-dimension',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
defaults = {
|
||||
'matrix-dimension': {
|
||||
'install_dir': '/opt/matrix-dimension',
|
||||
'data_dir': '/var/opt/dimension',
|
||||
'data_dir': '/var/opt/matrix-dimension',
|
||||
kunsi marked this conversation as resolved
|
||||
'database': {
|
||||
'user': 'matrix-dimension',
|
||||
'password': repo.vault.password_for('{} postgresql matrix-dimension'.format(node.name)),
|
||||
|
@ -20,13 +20,9 @@ defaults = {
|
|||
},
|
||||
},
|
||||
},
|
||||
'icinga2_api': {
|
||||
'mautrix-telegram': {
|
||||
'services': {
|
||||
'MAUTRIX-TELEGRAM PROCESS': {
|
||||
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -a mautrix-telegram -c 1:',
|
||||
},
|
||||
},
|
||||
'users': {
|
||||
'matrix-support': {
|
||||
'home': '/var/opt/matrix-dimension',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -39,7 +35,7 @@ def nginx_config(metadata):
|
|||
'nginx': {
|
||||
'vhosts': {
|
||||
metadata.get('matrix-dimension/url'): {
|
||||
'webroot': '/var/www/{}/webapp/'.format(metadata.get('element-web/url')),
|
||||
'webroot': '/var/www/{}/webapp/'.format(metadata.get('matrix-dimension/url')),
|
||||
'do_not_set_content_security_headers': True,
|
||||
'max_body_size': '50M',
|
||||
'proxy': {
|
||||
|
|
Loading…
Reference in a new issue
Do we really need to backup this?
npm writes all kinds of install info to this location, I guess so.
If it's only information we can restore using a
bw apply
, there should be no need to backup this. But if it's more than that, i'm okay with backing this up.