26 lines
911 B
Django/Jinja
26 lines
911 B
Django/Jinja
[Unit]
|
|
Description="GitHub Webhook server for updating Git repos"
|
|
Documentation=https://github.com/status-im/infra-role-github-webhook/tree/master/README.md
|
|
Requires=network-online.target
|
|
After=network-online.target
|
|
After=docker.service
|
|
|
|
[Service]
|
|
User={{ github_webhook_service_user }}
|
|
ExecStart={{ github_webhook_script_dir }}/server.py \
|
|
--port={{ github_webhook_port }} \
|
|
--repo-url={{ github_webhook_repo_url | mandatory }} \
|
|
--repo-branch={{ github_webhook_repo_branch | mandatory }} \
|
|
{% if github_webhook_post_command is defined %}
|
|
--post-command='{{ github_webhook_post_command | mandatory }}' \
|
|
{% endif %}
|
|
{{ github_webhook_dest_path | mandatory }}
|
|
WorkingDirectory={{ github_webhook_script_dir }}
|
|
RuntimeDirectory=github_webhook
|
|
PermissionsStartOnly=True
|
|
Restart=on-failure
|
|
Environment=WEBHOOK_SECRET={{ github_webhook_secret | mandatory }}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|