Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker rootless: gitea dump error: Unable to find configuration file: "/var/lib/gitea/custom/conf/app.ini" (doesn't respect GITEA_APP_INI) #19790

Closed
jjakob opened this issue May 23, 2022 · 2 comments · Fixed by #19794
Labels
topic/distribution This PR changes something about the packaging of Gitea type/bug

Comments

@jjakob
Copy link

jjakob commented May 23, 2022

Description

To back up gitea, I run this command:
docker-compose exec -T -u git gitea /bin/sh -c "umask 0027; /app/gitea/gitea dump --file=/backup/gitea-dump-backup.zip"
This worked fine in the standard image, but after converting to rootless, I'm getting this error:

...s/setting/setting.go:586:�loadFromConf()� �[F]� Unable to find configuration file: "/var/lib/gitea/custom/conf/app.ini"�.
	Ensure you are running in the correct environment or set the correct configuration file with -c.

If I exec into the container and run env I see that GITEA_APP_INI is correct:

GITEA_APP_INI=/etc/gitea/app.ini
GITEA_WORK_DIR=/var/lib/gitea
HOME=/var/lib/gitea/git
TMPDIR=/tmp/gitea
GITEA_TEMP=/tmp/gitea
GITEA_CUSTOM=/var/lib/gitea/custom

I have modified APP_DATA_PATH in app.ini, but I don't think that's the cause of this issue:

[repository]
ROOT = /var/lib/gitea/git/gitea-repositories

[server]
APP_DATA_PATH= /var/lib/gitea/data

[log]
ROOT_PATH = /var/lib/gitea/log

These are just the paths, the whole app.ini is much longer but I don't think it has any relevant info. All other paths are at their defaults.

If I modify the command to add -c /etc/gitea/app.ini it works fine.

Gitea Version

v1.16.7 (docker rootless image)

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Docker

How are you running Gitea?

Via my own docker-compose config with the official images.

Database

PostgreSQL

@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 24, 2022

@jjakob
Copy link
Author

jjakob commented May 25, 2022

Thanks, I did not know that script existed.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
@delvh delvh added topic/distribution This PR changes something about the packaging of Gitea and removed theme/docker labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/distribution This PR changes something about the packaging of Gitea type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants