39 lines
		
	
	
		
			1006 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1006 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
| [Unit]
 | |
| Description=Gitea Actions Runner
 | |
| Documentation=https://docs.gitea.io/en-us/actions/
 | |
| After=network.target docker.service
 | |
| Wants=docker.service
 | |
| 
 | |
| [Service]
 | |
| Type=simple
 | |
| User={{ gitea_runner_user }}
 | |
| Group={{ gitea_runner_user }}
 | |
| WorkingDirectory={{ gitea_runner_data_dir }}
 | |
| ExecStart={{ gitea_runner_binary }} daemon --config {{ gitea_runner_config_dir }}/config.yml
 | |
| ExecReload=/bin/kill -HUP $MAINPID
 | |
| KillMode=mixed
 | |
| KillSignal=SIGINT
 | |
| TimeoutStopSec=5
 | |
| Restart=always
 | |
| RestartSec=10
 | |
| StartLimitInterval=0
 | |
| 
 | |
| # Security settings
 | |
| NoNewPrivileges=yes
 | |
| PrivateTmp=yes
 | |
| ProtectSystem=strict
 | |
| ProtectHome=yes
 | |
| ReadWritePaths={{ gitea_runner_data_dir }} {{ gitea_runner_log_dir }} /var/run/docker.sock
 | |
| ProtectKernelTunables=yes
 | |
| ProtectKernelModules=yes
 | |
| ProtectControlGroups=yes
 | |
| 
 | |
| # Environment
 | |
| EnvironmentFile=-/etc/default/gitea-runner
 | |
| 
 | |
| # Logging
 | |
| StandardOutput=append:{{ gitea_runner_log_dir }}/gitea-runner.log
 | |
| StandardError=append:{{ gitea_runner_log_dir }}/gitea-runner-error.log
 | |
| 
 | |
| [Install]
 | |
| WantedBy=multi-user.target |