directories = { '/opt/ldap-frontend/src': {}, } git_deploy = { '/opt/ldap-frontend/src': { 'repo': 'https://git.franzi.business/qzwi/ldap-frontend.git', 'rev': 'main', 'triggers': { 'action:ldap-frontend_install_deps', 'action:ldap-frontend_compile_translations', 'svc_systemd:ldap-frontend:restart', }, }, } actions = { 'ldap-frontend_make_virtualenv': { 'command': 'virtualenv -p python3 /opt/ldap-frontend/venv', 'unless': 'test -d /opt/ldap-frontend/venv', 'needs': { 'directory:/opt/ldap-frontend/src', }, }, 'ldap-frontend_install_deps': { 'triggered': True, 'command': ' && '.join([ 'cd /opt/ldap-frontend/src', '/opt/ldap-frontend/venv/bin/pip install --upgrade -r requirements.txt', ]), 'needs': { 'action:ldap-frontend_make_virtualenv', }, }, 'ldap-frontend_compile_translations': { 'triggered': True, 'command': ' && '.join([ 'cd /opt/ldap-frontend/src/ldap_frontend', '/opt/ldap-frontend/venv/bin/pybabel compile -d translations', ]), 'needs': { 'action:ldap-frontend_install_deps', }, }, } files = { '/etc/systemd/system/ldap-frontend.service': { 'content_type': 'mako', 'triggers': { 'action:systemd-reload', 'svc_systemd:ldap-frontend:restart', }, }, '/opt/ldap-frontend/config.json': { 'content_type': 'mako', 'triggers': { 'svc_systemd:ldap-frontend:restart', }, }, } svc_systemd = { 'ldap-frontend': { 'needs': { 'action:ldap-frontend_install_deps', 'action:ldap-frontend_compile_translations', 'file:/etc/systemd/system/ldap-frontend.service', 'file:/opt/ldap-frontend/config.json', }, }, }