mirror of
https://gitea.com/gitea/act_runner
synced 2024-11-09 18:05:52 +01:00
fix: Exit docker container on any process exit (#462)
## Description Issue described in #460 ## Changes - Edited `supervisord.conf` to exit if it detects any of the supervisored processes exiting. - minor text fix ## Notes Without this change (or something similar), if act_runner fails, then the container will stay up as a zombie container - it does nothing and does not restart. After this change, if act_runner fails (e.g. due to Gitea instance being down), then supervisord will exit and the container will be restarted. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/462 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: davidfrickert <david.frickert@protonmail.com> Co-committed-by: davidfrickert <david.frickert@protonmail.com>
This commit is contained in:
parent
f17cad1bbe
commit
f1f9142a3c
@ -27,7 +27,7 @@ func CheckIfDockerRunning(ctx context.Context, configDockerHost string) error {
|
||||
|
||||
_, err = cli.Ping(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot ping the docker daemon, does it running? %w", err)
|
||||
return fmt.Errorf("cannot ping the docker daemon, is it running? %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -11,3 +11,7 @@ stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
command=/opt/act/rootless.sh
|
||||
|
||||
[eventlistener:processes]
|
||||
command=bash -c "echo READY && read line && kill -SIGQUIT $PPID"
|
||||
events=PROCESS_STATE_STOPPED,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL
|
Loading…
Reference in New Issue
Block a user