-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Running gitea migrate appears to race with starting server using docker-compose #12529
Comments
Here is one of the error messages that I get when, apparently, the starting of the gitea server races with a run of the
|
Gitea automatically runs migrate when it is started. See: Line 76 in c6943cc
It should therefore be unnecessary to explicitly run migrate. (Except where you want to explicitly run it to test things.) You shouldn't run migrate whilst Gitea is running. |
Thanks. So it sounds like there is a bug here because as I mention in the original description, if I run
(with
which seems to suggest that migrations have not been run. |
The lack of a User table suggests that the database has not been created let alone migrated. If you look at your app.ini:
That pushes Gitea into Install mode which would not init the db because Gitea is expecting to be told where the DB is to be created. You would need to set
and provide the INTERNAL_TOKEN, JWT_SECRET, LFS_JWT_SECRET, and SECRET_KEY.
could be used to generate those however. |
Thank you very much, @zeripath. |
Firstly, thanks for this awesome project.
I've searched the issue tracker and can't seem to find anything that deals with the specific issue, although I note something related is discussed in #5290 (a change which was then reverted in #5730).
I've also done some preliminary investigation via Discord with @techknowlogick (many thanks):
https://discordapp.com/channels/322538954119184384/345384901144477698/745266163038289940
[x]
):Description
Run the following steps to create a bare-bones
gitea
setup using Docker (config is basically taken from https://docs.gitea.io/en-us/install-with-docker/):Now start
gitea
:Now try and add a new user:
This fails with:
Indeed this command only appears to work if I run the following first:
However, it appears that running the
migrate
admin task immediately after startinggitea
(viadocker-compose up -d
) creates some sort of race condition where the migrate can fail.So this is as much a question as a bug report: what should I be doing here?
@techknowlogick suggested that the
migrate
step was unnecessary, but it appears to be required. Yet runningmigrate
soon after startinggitea
appears to race with something, causing the migrate to fail.Thanks in advance.
Screenshots
n/a
The text was updated successfully, but these errors were encountered: