Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
migrate database if app.ini found #5290
For my installation of gitea, I needed unattended initial config. @techknowlogick told me on Discord that it could be done using then new migrate command,
I've added in the Docker entrypoint:
It works correctly on my machine, in my docker-compose the data volume is mapped with only the config file and the platform auto-inits. However I can see in the logs this error which does not affect behaviour:
@@ Coverage Diff @@ ## master #5290 +/- ## ========================================= Coverage ? 37.83% ========================================= Files ? 322 Lines ? 47489 Branches ? 0 ========================================= Hits ? 17968 Misses ? 26935 Partials ? 2586
This was referenced
Jan 11, 2019
@techknowlogick I think unfortunately there may still be problems with this.
The correct place for automigration is likely within the gitea script within the s6 folder. That would require a little refactoring of that to make it work.
However a simple improvement is that we should change the migrate line to:
as per my comment:
Then this will more closely match how docker starts Gitea so if people have used relative paths etc in their app.ini we're not affected by these.
I won't have a chance to write a pr for this for several days so if you can or get a friendly minion please do.