mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-11-06 20:28:46 +01:00
Earlier all of buildbtw would live in the same dir at /var/lib/buildbtw which was especially annoying for the review instances where we'd get 10s of databases in the same dir. This now also correctly cleans up old instance dirs.
33 lines
940 B
Django/Jinja
33 lines
940 B
Django/Jinja
[Unit]
|
|
Description=buildbtw build coordination service
|
|
|
|
[Container]
|
|
{% if buildbtw_stage == "review" %}
|
|
Image=registry.archlinux.org/archlinux/buildbtw/backend:%i
|
|
{% else %}
|
|
Image=registry.archlinux.org/archlinux/buildbtw/backend:{{ buildbtw_image_tag }}
|
|
{% endif %}
|
|
Exec=run
|
|
ContainerName=buildbtw-%i
|
|
Environment="BUILDBTW_LISTEN=unix:/run/buildbtw/%i.sock:777"
|
|
{% if buildbtw_stage == "review" %}
|
|
Environment="BUILDBTW_SERVER_URL=https://%i.{{ buildbtw_domain }}"
|
|
{% else %}
|
|
Environment="BUILDBTW_SERVER_URL=https://{{ buildbtw_domain }}"
|
|
{% endif %}
|
|
EnvironmentFile=/etc/conf.d/buildbtw
|
|
Pull=newer
|
|
Volume={{ buildbtw_dir }}/instances/%i:/var/lib/buildbtw
|
|
Volume={{ buildbtw_dir }}/ssh/id_ed25519:/root/.ssh/id_ed25519:ro
|
|
Volume=/run/buildbtw:/run/buildbtw
|
|
|
|
[Service]
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|
|
{% if buildbtw_stage != "review" %}
|
|
DefaultInstance={{ buildbtw_stage }}
|
|
{% endif %}
|