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

Disable auto-migrate in docker container #5730

Merged
merged 6 commits into from
Jan 18, 2019
Merged

Disable auto-migrate in docker container #5730

merged 6 commits into from
Jan 18, 2019

Conversation

techknowlogick
Copy link
Member

Credit to @zeripath

Hopefully fixes #5688

ping @AragurDEV

@codecov-io
Copy link

codecov-io commented Jan 15, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@7d65ddf). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5730   +/-   ##
=========================================
  Coverage          ?   37.76%           
=========================================
  Files             ?      327           
  Lines             ?    47803           
  Branches          ?        0           
=========================================
  Hits              ?    18052           
  Misses            ?    27160           
  Partials          ?     2591

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d65ddf...92c0fda. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 15, 2019
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't match the line I suggested:

(cd /app/gitea; exec su-exec $USER /app/gitea/gitea migrate)

Your suggested working directory isn't correct.

The thing is we need try to replicate the exact environment that docker runs Gitea in so that relative paths in the conf file work. See https://github.com/go-gitea/gitea/blob/master/docker/etc/s6/gitea/run

@techknowlogick
Copy link
Member Author

@zeripath updated path

@zeripath
Copy link
Contributor

OK I think this is worth a try. It's a shame we can't really test it...

@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 15, 2019
@Aragur
Copy link

Aragur commented Jan 16, 2019

After using this PR migration is still not working:

gitea     | 2019/01/16 09:05:56 [I] Migration: add theme to users
gitea     | 2019/01/16 09:05:56 [...gitea/cmd/migrate.go:47 runMigrate()] [E] Failed to initialize ORM engine: sync database struct error: Error 1265: Data truncated for column 'theme' at row 1

@techknowlogick techknowlogick changed the title Fix auto-migrate and deal with relative paths Disable auto-migrate in docker container Jan 17, 2019
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just remove it rather than comment it out but in either case disabling this seems appropriate.

@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 18, 2019
@techknowlogick techknowlogick merged commit ec93315 into go-gitea:master Jan 18, 2019
@techknowlogick techknowlogick deleted the techknowlogick-patch-11 branch January 18, 2019 03:31
@pr4xx
Copy link

pr4xx commented Jan 18, 2019

But what was this used for? As far as I understand this is used to auto migrate for things like docker and using image :latest.

@zeripath
Copy link
Contributor

There was a misunderstanding about why a user provided app.ini was not working. I think the issue actually might have been that the app.ini was not readable by Gitea.

In any case this fix caused more problems than it should have

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/deployment type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission denied after latest docker upgrade
7 participants