reload config without forking #8245

Open
opened 2025-11-02 07:59:24 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @6543 on GitHub (Dec 14, 2021).

killall -s HUP gitea reload config

this can not be integrated into init scripts ...
as gitea will fork into background

see https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28196

affected versions: v1.15.x - master

9879e23c57/modules/graceful/manager_unix.go (L166-L179)

Originally created by @6543 on GitHub (Dec 14, 2021). `killall -s HUP gitea` reload config this can not be integrated into init scripts ... as gitea will fork into background see https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28196 affected versions: v1.15.x - master https://github.com/go-gitea/gitea/blob/9879e23c576a7e1352269f3d344d397f8265b4c4/modules/graceful/manager_unix.go#L166-L179
GiteaMirror added the type/feature label 2025-11-02 07:59:24 -06:00
Author
Owner

@xoxys commented on GitHub (Jul 31, 2023):

@6543 Is this still not fixed? Reloading the Gitea config without a restart not possible?

@xoxys commented on GitHub (Jul 31, 2023): @6543 Is this still not fixed? Reloading the Gitea config without a restart not possible?
Author
Owner

@lunny commented on GitHub (Aug 1, 2023):

It's still not possible.

@lunny commented on GitHub (Aug 1, 2023): It's still not possible.
Author
Owner

@itoffshore commented on GitHub (Jul 25, 2025):

For anyone coming across this running gitea in a container:


  • The following command inside the container does cause gitea to restart (at time of writing), but also leaves the container in a healthy state:
kill -s SIGHUP $(pidof gitea)
  • after the restart
USER        PID         PPID        %CPU        ELAPSED           TTY         TIME        COMMAND
git         1           0           0.000       23m13.040761311s  ?           0s          /usr/bin/dumb-init -- /usr/local/bin/docker-entrypoint.sh 
git         6           1           0.000       23m13.041037749s  ?           0s          /usr/local/bin/gitea -c /etc/gitea/app.ini web 
  • To run this on a podman or docker container from a shell script use something like:
reload_cmd="podman exec -it $ctr kill -s SIGHUP $(pidof gitea)"
@itoffshore commented on GitHub (Jul 25, 2025): For anyone coming across this running `gitea` in a container: --- * The following command **inside** the container **does** cause `gitea` to **restart** (at time of writing), but also leaves the container in a healthy state: ``` kill -s SIGHUP $(pidof gitea) ``` * after the restart ``` USER PID PPID %CPU ELAPSED TTY TIME COMMAND git 1 0 0.000 23m13.040761311s ? 0s /usr/bin/dumb-init -- /usr/local/bin/docker-entrypoint.sh git 6 1 0.000 23m13.041037749s ? 0s /usr/local/bin/gitea -c /etc/gitea/app.ini web ``` * To run this on a `podman` or `docker` container from a `shell` script use something like: ``` reload_cmd="podman exec -it $ctr kill -s SIGHUP $(pidof gitea)" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8245