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 pull update , app.ini isn't work,redirect to install page #5933

Closed
ranforce opened this issue Feb 22, 2020 · 13 comments
Closed

docker pull update , app.ini isn't work,redirect to install page #5933

ranforce opened this issue Feb 22, 2020 · 13 comments
Labels
💊 bug Something isn't working status: needs feedback Tell me more about it

Comments

@ranforce
Copy link

ranforce commented Feb 22, 2020

Describe the bug

I did some task like these steps:
docker pull gogs/gogs
// mounted /data to volumes and docker-compose up again
After docker container up,when open gogs login page,browser was redirect to /install (install page).
But change docker-compose image from gogs/gogs:last to gogs/gogs:0.11, it works.
Last good version i know is 0.12.0-dev.

Gogs version or commit

On branck master near 2020-2-22 15:31:01 ,I think.

Git version

$ git version

Operating system

Database

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Can you reproduce the bug at https://try.gogs.io?

No.It seems to be ok now.

Expected behavior

Docker image update safely.

Actual behavior

It seems to be something wrong with app.ini,app conf didn't work.

Screenshots

Additional context

@sebw
Copy link

sebw commented Feb 22, 2020

My gogs contained gets updated automatically to latest with watchtower.

This morning gogs was reported down, because it's listening on port 3000 while Traefik would expect it to run on port 3001 (per my gogs config file).

gogs is not using my config file anymore and it apparently expects my config file to be located somewhere else:

2020/02/22 10:29:48 [ WARN] Custom config "/app/gogs/custom/conf/app.ini" not found. Ignore this warning if you're running for the first time

My volume has always been mounted as /data, I fail to find in the changelog what things have changed.

@unknwon
Copy link
Member

unknwon commented Feb 22, 2020

Thanks for the report! I'm looking into it.

@unknwon
Copy link
Member

unknwon commented Feb 22, 2020

The problem seems it is not reading GOGS_CUSTOM env var, investigating.

@unknwon
Copy link
Member

unknwon commented Feb 22, 2020

Patch pushed: d3ecd22, waiting for Docker Hub to build the image.

@unknwon unknwon added the 💊 bug Something isn't working label Feb 22, 2020
@unknwon
Copy link
Member

unknwon commented Feb 22, 2020

Image is up! Please do another docker pull gogs/gogs:latest to pull the patched version :)

Sorry about down time, doing a lot refactoring recently.

@unknwon unknwon added the status: needs feedback Tell me more about it label Feb 22, 2020
@sebw
Copy link

sebw commented Feb 22, 2020

Thanks for the quick patch! It works, I'm back in business :-)

@unknwon unknwon closed this as completed Feb 22, 2020
@KostyaEsmukov
Copy link
Contributor

@unknwon Thank you for the fix!

  1. The gogs/gogs:0.11 docker tag is updated 3 years ago, while there's a newer patch version tagged as gogs/gogs:0.11.91 6 months ago. Would it be possible to always update the gogs/gogs:0.11 tag for all patch releases within the 0.11 series, so we could automatically receive patches for the current stable version without changing the tag?
  2. I'm considering switching from gogs/gogs:latest (which version is 0.12.0+dev) to the latest stable release gogs/gogs:0.11.91 to reduce risk of downtime in future. Could you please tell if the data in the docker volume (i.e. repositories and sqlite database) are fully compatible with the older 0.11 version?

Thanks in advance!

@unknwon
Copy link
Member

unknwon commented Feb 22, 2020

2. I'm considering switching from gogs/gogs:latest (which version is 0.12.0+dev) to the latest stable release gogs/gogs:0.11.91 to reduce risk of downtime in future. Could you please tell if the data in the docker volume (i.e. repositories and sqlite database) are fully compatible with the older 0.11 version?

Yes, it is safe to pin back to 0.11.91.

  1. The gogs/gogs:0.11 docker tag is updated 3 years ago, while there's a newer patch version tagged as gogs/gogs:0.11.91 6 months ago. Would it be possible to always update the gogs/gogs:0.11 tag for all patch releases within the 0.11 series, so we could automatically receive patches for the current stable version without changing the tag?

Good idea, I'll think about it next time cutting a release 👍

@KostyaEsmukov
Copy link
Contributor

Great, thank you!

@ranforce
Copy link
Author

ranforce commented Apr 1, 2020

@unknwon Thank you for the fix!

  1. The gogs/gogs:0.11 docker tag is updated 3 years ago, while there's a newer patch version tagged as gogs/gogs:0.11.91 6 months ago. Would it be possible to always update the gogs/gogs:0.11 tag for all patch releases within the 0.11 series, so we could automatically receive patches for the current stable version without changing the tag?
  2. I'm considering switching from gogs/gogs:latest (which version is 0.12.0+dev) to the latest stable release gogs/gogs:0.11.91 to reduce risk of downtime in future. Could you please tell if the data in the docker volume (i.e. repositories and sqlite database) are fully compatible with the older 0.11 version?

Thanks in advance!

Thank you, 0.11.91 will be much better.


I check my docker-compose.yml ,I had changed it already.

@ranforce
Copy link
Author

ranforce commented Apr 1, 2020

I made cron jobs to pull gogs/gogs:latest like this:

docker pull gogs/gogs | grep 'Status: Downloaded newer image for docker.io/gogs/gogs' && echo 'do sth'

And I found this issue and thought the tag latest was not designed to be stable ,then I drop cron jobs.
Thanks anyway.

@leopucci
Copy link

leopucci commented Nov 8, 2020

Hi, I am facing a similar problem on Centos 8 version 0.12.3
Server runs ok. Login acess OK.
It shows the commits, list them. Diffs, etc.

But on the web interface, when I try to access a folder, it says: http 500
An error has occurred : get submodule "2_Api/nodetomic-api-swagger": revision does not exist

So i tryed to fix writing some code in the folder to see if it goes away.

But when I try this. The following message appears:
[ WARN] Custom config "/etc/gogs/conf/app.ini" not found. Ignore this warning if you're running for the first time remote: Gogs: Internal error remote: Failed to set database engine: open database: dial tcp 127.0.0.1:5432: connect: connection refused

Gogs is running with git user. git user does not have a folder with profile. Does not have GOGS_CUSTOM set anywhere.
At least I did not found it. Also searched on the System.d start/stop file.

I have fixed the issue. How? Copying the /opt/gogs/custom/conf/app.ini to /etc/gogs/conf/

When I push a commit, it spawns a new process? that uses the GOGS_CUSTOM.
I say that because I have made the copy and did not need to restart the service to make it work. Just pushed again it worked. So it seems that it is a subprocess that somehow is looking for the file.

Is there a proper way to solve this? Not by duplicating the config file?
Thanks
Pucci

@unknwon
Copy link
Member

unknwon commented Nov 9, 2020

@leopucci Seems like you're installing from packager.io? If so, the GOGS_CUSTOM is defined here:

${CLI} config:set GOGS_CUSTOM=/etc/${APP_NAME}

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working status: needs feedback Tell me more about it
Projects
None yet
Development

No branches or pull requests

5 participants