infrastructure-as-code/roles/woodpecker-dc/templates/woodpecker-agent-lxc.service.j2
Maximilian Kratz eeb29be95b Adds a Woodpecker Agent with LXC support as systemd service
Adds missing plugin-git binary
Adds autostart to Woodpecker agent LXC systemd service
Use woodpecker-forgejo-server image
Adds platform label to agent
Always restart the systemd service
Re-add Docker-based Woodpecker agent
Changes agent image to forgejo one + explicitely set the backend to use
plugin-git: Always download latest release from GitHub
Typo in name
2023-02-05 13:03:23 +01:00

22 lines
489 B
Django/Jinja

[Unit]
Description=LXC Woodpecker agent instance
Requires=docker.service
After=docker.service
[Service]
Type=simple
Environment=WOODPECKER_SERVER=127.0.0.1:9000
Environment=WOODPECKER_AGENT_SECRET="{{ woodpecker_config.agent_secret }}"
Environment=WOODPECKER_BACKEND=lxc
Environment=WOODPECKER_FILTER_LABELS=platform=lxc
ExecStart=/opt/woodpecker/woodpecker-agent
Restart=always
RestartSec=10
ExecReload=/bin/kill -HUP $MAINPID
User=root
Group=root
[Install]
WantedBy=multi-user.target