Closed TheBig-O closed 7 months ago
Well… the setup screen only shows when
[security]
INSTALL_LOCK = true
is not set or false in the app.ini
.
Normally, gitea should explicitly prevent that by setting this setting as soon as you complete the install page.
The fact that this hasn't been done indicates to me that Gitea wasn't able to set it, i.e. because the file is read-only.
Is the app.ini
perhaps mounted read-only in your container?
In summary, normally Gitea doesn't need to be reinitialized after a crash.
Furthermore, according to your logs, it didn't even crash, the OS told it to shutdown:
2023/09/23 12:36:09 ...eful/manager_unix.go:149:handleSignals() [W] [6506aa61] PID 15. Received SIGTERM. Shutting down...
If that's the case, could you please check as well if [security].INTERNAL_TOKEN
has been persisted?
If no, then you might have a lot of problems.
Thank you for the feed back. I had restarted the container, which is the sigterm line. Where would I check if it is persisted?
I don't know exactly where the app.ini
is located in the Docker container, but I guess something like var/lib/gitea/custom/conf/app.ini
or /etc/gitea/custom/conf/app.ini
In the worst case:
find / -type f -name 'app.ini'
That will certainly find it, but might take a bit.
I found it pretty easily. It's in the "/conf/" folder and is part of the the Volume setup for my docker-compose.yml.
Each of the items you mentioned and all were set as you suggested.
I'm not sure why that page popped up. The only real error I can point to is install/routes.go:120(install.installNotFound)
in the log I posted before. It "Shouldn't" have shown that page, but definitely did. I'll keep an eye on it and see if I can recreate it.
Maybe you mixed "root" / "rootless" image. Their directory layouts are different.
Feel free to reopen if there are reproducible steps with latest release.
Description
This morning, Gitea crashed and instead of showing warnings or some other screen, the initial setup screen appeared with all the settings I had as environment variables in the docker-compose.yml. Because it had the IP addresses, file paths, and passwords, I think this is not the right thing to be showing if there is an error. I would be okay with the paths and database names, but really don't want my password being available to someone if Gitea crashes again. Is there a way to disable the setup screen? Below is the relevant log information. I removed IPs and replaced with 000.00.000.000 in three spots. Thanks for your help!
Gitea Version
1.19.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.38.5
Operating System
Debian Linux
How are you running Gitea?
Gitea is running in a Docker Container using Compose.
Database
MySQL/MariaDB