2020-09-06 10:05:42 +00:00
|
|
|
actions = {
|
|
|
|
'mautrix-telegram_create_virtualenv': {
|
|
|
|
'command': '/usr/bin/python3 -m virtualenv -p python3 /opt/mautrix-telegram/venv/',
|
|
|
|
'unless': 'test -d /opt/mautrix-telegram/venv/',
|
|
|
|
'needs': {
|
2020-11-10 12:26:03 +00:00
|
|
|
# actually /opt/mautrix-telegram, but we don't create that
|
|
|
|
'directory:/opt/mautrix-telegram/src',
|
2020-09-06 10:05:42 +00:00
|
|
|
},
|
|
|
|
},
|
2020-11-07 08:39:57 +00:00
|
|
|
'mautrix-telegram_install_bridge': {
|
2020-11-09 11:12:33 +00:00
|
|
|
'command': 'cd /opt/mautrix-telegram/src && /opt/mautrix-telegram/venv/bin/pip install --upgrade pip .[all]',
|
2020-11-07 08:39:57 +00:00
|
|
|
'needs': {
|
|
|
|
'action:mautrix-telegram_create_virtualenv',
|
|
|
|
},
|
|
|
|
'triggered': True,
|
|
|
|
},
|
2020-09-06 10:05:42 +00:00
|
|
|
}
|
|
|
|
|
2020-11-10 12:23:22 +00:00
|
|
|
users = {
|
|
|
|
'mautrix-telegram': {
|
|
|
|
'home': '/opt/mautrix-telegram',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2020-11-07 08:39:57 +00:00
|
|
|
directories = {
|
2021-07-23 05:58:15 +00:00
|
|
|
'/opt/mautrix-telegram': {},
|
2020-11-07 08:39:57 +00:00
|
|
|
'/opt/mautrix-telegram/src': {},
|
|
|
|
}
|
|
|
|
|
|
|
|
git_deploy = {
|
|
|
|
'/opt/mautrix-telegram/src': {
|
2021-08-06 14:25:21 +00:00
|
|
|
'repo': 'https://github.com/mautrix/telegram.git',
|
|
|
|
'rev': node.metadata.get('mautrix-telegram/version'),
|
2020-09-20 08:30:13 +00:00
|
|
|
'triggers': {
|
2020-11-07 08:39:57 +00:00
|
|
|
'action:mautrix-telegram_install_bridge',
|
2020-09-20 08:30:13 +00:00
|
|
|
'svc_systemd:mautrix-telegram:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-06 10:05:42 +00:00
|
|
|
svc_systemd = {
|
|
|
|
'mautrix-telegram': {
|
|
|
|
'needs': {
|
2022-01-02 12:38:23 +00:00
|
|
|
'action:mautrix-telegram_install_bridge',
|
2020-09-06 10:05:42 +00:00
|
|
|
'file:/etc/systemd/system/mautrix-telegram.service',
|
2020-09-12 10:59:34 +00:00
|
|
|
'file:/opt/mautrix-telegram/config.yaml',
|
2020-09-06 10:05:42 +00:00
|
|
|
'postgres_db:mautrix-telegram',
|
|
|
|
'postgres_role:mautrix-telegram',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
2020-09-12 10:59:34 +00:00
|
|
|
'/opt/mautrix-telegram/registration.yaml': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:mautrix-telegram:restart',
|
|
|
|
},
|
|
|
|
},
|
2020-09-06 10:05:42 +00:00
|
|
|
'/opt/mautrix-telegram/config.yaml': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:mautrix-telegram:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/systemd/system/mautrix-telegram.service': {
|
|
|
|
'triggers': {
|
2020-09-12 11:03:15 +00:00
|
|
|
'action:systemd-reload',
|
2020-09-06 10:05:42 +00:00
|
|
|
'svc_systemd:mautrix-telegram:restart',
|
|
|
|
},
|
2020-09-12 10:09:20 +00:00
|
|
|
},
|
2020-09-06 10:05:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if node.has_bundle('matrix-synapse'):
|
2020-09-12 10:59:34 +00:00
|
|
|
files['/opt/mautrix-telegram/registration.yaml']['triggers'].add('svc_systemd:matrix-synapse:restart')
|