-
Notifications
You must be signed in to change notification settings - Fork 5k
How to set proper custom config file? #2174
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
Comments
/etc/gogs/conf/app.ini |
@stonerl , the file
I am not sure it's a good idea to edit it. |
That's because it takes the file from /opt/gogs/conf/ and copies it to /etc/gogs/conf you must not change the file into /opt/... -----Original Message----- @stonerl , the file
I am not sure it's a good idea to edit it. Reply to this email directly or view it on GitHub: |
@z0rr0 have a look here: https://gogs.io/docs/advanced/configuration_cheat_sheet |
This has been changed because some users where hitting a severe bug #1897 |
cc @crohr : I think it's not a good idea to keep full version of default configuration as default configuration may have bug sometimes, so the best way is just use the parts that user customized. In this case,
How do you think? |
@z0rr0 what is the situation of this issue now...? |
@unknwon I don't know how to set custom configuration properly. One my project uses ubuntu-based docker image with gogs deb package. It rewrited a custom config file and worked well before. |
What does this mean? What is the definition of your |
@unknwon Do I right understand that gogs replaces |
@z0rr0 No, Gogs replaces nothing. It was replaced by packager.io builder, but I think they have fixed this problem. |
@unknwon I see this behavior using a package |
According to https://github.com/gogits/gogs/blob/master/packager/hooks/postinst#L18 , you should use |
I use this
And
Why IP |
If you use MySQL, So what database are you using exactly? |
@unknwon yes, it's expected, but can I set another value? My custom I used a configuration file |
Can you the stdout of Gogs? Because Gogs prints which custom file it uses there. |
|
@unknwon It helped! All works perfect. Thank you very much! |
@z0rr0 Great, so there |
Hello, I am struggling to run gogs without install step with docker (ubuntu 14.04) So in my Dockerfile I add a custom app.ini in a temporary folder at image build, then in the start.sh, once the /data/gogs folder are created (i added /data/gogs/custom/conf in the create_volume_subfolder function), I sed the custom app.ini file to update variable like domain / db_type and set INSTALL_LOCK = true. But when I run the gogs container (with -v /gogs:/data), and browse my_server_ip:proxy_port, I hit directly the install page. If I exec -it bash in the container, I see my custom app.ini at /data/gogs/custom/conf/app.ini but it is not used. Before install, no other app.ini file is present on the image when I I am a bit lost with all the paths :
Which one is the correct one (the one gogs reads before install step) that I need to edit/create to skip this install step ? I tried with gogs/gogs:latest and 0.8.25 Thanks |
@trompx For the Docker case, please read https://github.com/gogits/gogs/blob/master/docker/README.md |
I already did, and it's quite unclear. On this page, Settings - Applications. Are the settings the one we are supposed to fill on the install page ? If yes, that's those variables I'd like to set in a custom app.ini file to not have to fill them at install. In the same section of the page your mentionned, a link redirect to https://gogs.io/docs/advanced/configuration_cheat_sheet.html which talks about the custom app.ini file (while it is not mentionned on the docker gogs page). So where does this file is supposed to be in the first place ? running the gogs/gogs:latest just after pulling it from the repo, doing So where are those files, when are they created, or where are we supposed to create them ? |
It is very clear where the custom files are stored:
|
At https://gogs.io/docs/advanced/configuration_cheat_sheet.html, At https://github.com/gogits/gogs/blob/master/docker/README.md, the directory structure you copied is refered to as the So you are saying that the |
You only need to follow the README unless you want to dig into details: https://github.com/gogits/gogs/blob/master/Dockerfile#L9
|
Thanks for the clarification. |
I found this very confusing as well. Maybe it's more so for docker where there isn't an existing directory with
led me to think I should create a folder called After trying Apparently this message only goes to stdout, not the log file? This info though is the most useful, especially when trying to find where configuration is read from and what the values are. Also helpful would be clarification that if Otherwise it's working pretty well! Thanks. |
Custom config
/opt/gogs/custom/conf/app.ini
was removed from debian package ver. 0.8.0, so custom configuration settings are not used. As I understand it was done in the commit fa8bf0f.How can I set custom settings?
Gogs deb package version: 0.8.0-1449979765.4df378b.trusty
OS: Ubuntu GNU/Linux 14.04 3.13.0-71-generic x86_64
Git: 1.9.1
The text was updated successfully, but these errors were encountered: