[x]):When using Docker/ Compose. Placing an app.ini in /data/gitea/ or /data/gitea/conf/ does not work. It seems like the custom config gets ignored/ deleted. It only works when I bend GITEA_CUSTOM to a different directory, /custom in my case. It seems like inside the /data/gitea/ the app.ini file gets overwritten/ deleted on startup of gitea.
OK, when bending the /custom directory to a volume on my disk, via Docker Compose, using a custom app.ini stops working. When I go back to use the file system inside the container it works again.
@bienchen Hi, can you provide your docker-compose file (censor any data sensible) ? or from what documentation you based it ?
It will help use understand how you are setup and diagnose what is wrong.
You can also have a look on our discord where there is a chan dedicated for docker with maintainer and users which could help you.
Documentation: https://docs.gitea.io/en-us/install-with-docker/
Dockerfile is attached, docker-compose.yml attached. I think the mounting of volumes may be an issue. I copy the custom app.ini into GITEA_CUSTOM during docker build, when mounting a volume to that path the app.ini gets shadowed and gitea creates a new one on startup.
I just re-check the setup script and the config should not be re-written if existing. https://github.com/go-gitea/gitea/blob/master/docker/root/etc/s6/gitea/setup#L17
I will have to re-check but docker doesn't copy the original content (from container) when using bind mount.
I would suggest you to store your custom file somewhere else and copy (or link) it in the setup script to your bind path.
Yeah, if I leave the app.ini in the container file system it works. Then its present on gitea startup.
I have check and bind mount are not copied.
You can override the part in the setup script that generate the configuration by copying your config set at build time just after the check that the folder doesn't exist yet https://github.com/go-gitea/gitea/blob/master/docker/root/etc/s6/gitea/setup#L17.
Thanks for checking. This setup script is not called during docker build but when starting the container at entrypoint. What I'm gonna do is copy the config set into the image's file system during build and point GITEA_CUSTOM to it. That way the config file exists when the setup script checks for it.