Deploy `digdag` systemd file and enable `digdag`.

This commit is contained in:
Kazuhiro MUSASHI 2023-01-15 20:18:50 +09:00
parent e4282e28d7
commit b208ff620e
3 changed files with 19 additions and 13 deletions

View File

@ -1,7 +0,0 @@
[program:digdag]
command=/etc/digdag/digdag.sh
stdout_logfile=/var/log/supervisor/digdag.log
redirect_stderr=true
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=5
autorestart=true

View File

@ -0,0 +1,15 @@
[Unit]
Description=digdag
Requires=network-online.target
After=network-online.target
[Service]
Type=simple
EnvironmentFile=-/etc/default/digdag
Restart=on-failure
ExecStart=/etc/digdag/digdag.sh
KillSignal=process
[Install]
WantedBy=multi-user.target

View File

@ -36,17 +36,15 @@ execute 'ufw reload-or-enable' do
action :nothing
end
# Deploy the config file for `supervisor`:
remote_file '/etc/supervisor/conf.d/digdag.conf' do
# Deploy the config file for `systemd`:
remote_file '/lib/systemd/system/digdag.service' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
end
service 'supervisor' do
action :nothing
service 'digdag' do
action [ :enable, :restart ]
end
# Deploy /etc/hosts file: