feat: full untested ansible setup

This commit is contained in:
Twirre Meulenbelt
2026-04-22 12:22:58 +02:00
parent b1d9b2a857
commit 0d967909e7
37 changed files with 1362 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
{% set app_vault_env = vars['vault_' + (bun_app.name | replace('-', '_')) + '_env'] | default({}) %}
{% set app_non_vault_env_keys = bun_app.non_vault_env_keys | default([]) %}
{% set app_filtered_vault_env = app_vault_env | dict2items | rejectattr('key', 'in', app_non_vault_env_keys) | items2dict %}
{% for key, value in (bun_app.env | combine(app_filtered_vault_env)) | dictsort %}
{{ key }}={{ value }}
{% endfor %}

View File

@@ -0,0 +1,17 @@
[Unit]
Description={{ bun_app.name }} Bun service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User={{ bun_app.deploy_user }}
Group={{ bun_app.deploy_group }}
WorkingDirectory={{ bun_app.path }}
EnvironmentFile=/etc/{{ bun_app.name }}/app.env
ExecStart={{ bun_bin_path }} {{ bun_app.entrypoint }}
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target