bundles/mautrix-telegram: also deploy alembic.ini, make sure alembic ini gets called if alembic scripts dir does not exist
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-09-12 12:09:20 +02:00
parent cf2920f284
commit f6ecaf3c29
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 82 additions and 2 deletions

View file

@ -27,12 +27,20 @@ actions = {
},
'triggered': True,
},
'mautrix-telegram_init_alembic': {
'command': '/opt/mautrix-telegram/venv/bin/alembic -c /opt/mautrix-telegram/alembic.ini -x /opt/mautrix-telegram/config.yaml init /opt/mautrix-telegram/alembic',
'unless': 'test -d /opt/mautrix-telegram/alembic',
'needs': {
'file:/opt/mautrix-telegram/alembic.ini',
},
},
'mautrix-telegram_upgrade_database': {
'command': '/opt/mautrix-telegram/venv/bin/alembic -x /opt/mautrix-telegram/config.yaml upgrade head',
'command': '/opt/mautrix-telegram/venv/bin/alembic -c /opt/mautrix-telegram/alembic.ini -x /opt/mautrix-telegram/config.yaml upgrade head',
'needs': {
# Actually, the dependency is 'mautrix-telegram has run
# atleast once, but we can't check that.
'action:mautrix-telegram_generate_registration',
'action:mautrix-telegram_init_alembic',
'postgres_db:mautrix-telegram',
'postgres_role:mautrix-telegram',
},
@ -63,7 +71,8 @@ files = {
'triggers': {
'svc_systemd:mautrix-telegram:restart',
},
}
},
'/opt/mautrix-telegram/alembic.ini': {},
}
if node.has_bundle('matrix-synapse'):