-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Declare DOMAIN variable for docker setup #10780
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
Conversation
* `DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI. | ||
* `SSH_DOMAIN`: **""**: Domain name of this server, used for the displayed clone URL in Gitea's UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI. | |
* `SSH_DOMAIN`: **""**: Domain name of this server, used for the displayed clone URL in Gitea's UI. | |
* `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI. | |
* `SSH_DOMAIN`: **""**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. |
Just to make it clear what the difference is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but during the /install page, the line for the SSH Domain Server takes the DOMAIN variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I aggree with @gary-kim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but during the /install page, the line for the SSH Domain Server takes the DOMAIN variable
You don't have to take my suggested change as is, feel free to change it to what you feel makes the difference and purpose clear. Just want to make sure no one asks why there are two different environment variables for the same setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thanks for the feedback. I have done some modifications.
In the /install form, the value for SSH Server Domain is taken form the DOMAIN variable and overwrites SSH_DOMAIN environment variable set the first time if nothing done
@gary-kim please review |
Codecov Report
@@ Coverage Diff @@
## master #10780 +/- ##
==========================================
- Coverage 43.28% 43.27% -0.02%
==========================================
Files 605 605
Lines 86207 86207
==========================================
- Hits 37319 37304 -15
- Misses 44292 44304 +12
- Partials 4596 4599 +3
Continue to review full report at Codecov.
|
In the /install form, the value for SSH Server Domain is taken form the DOMAIN variable and overwrites SSH_DOMAIN environment variable set the first time if nothing done Co-authored-by: Adrian POIGET <[email protected]>
In the /install form, the value for SSH Server Domain is taken form the DOMAIN variable
and overwrites SSH_DOMAIN environment variable set the first time if nothing done
I'm configuring a docker-compose for gitea 1.11.3, I changed SSH_DOMAIN environment, the app.ini takes the variable value but when I go to /install , the value is "localhost" and SSH_DOMAIN is overwritten if i don't change it.
I looked a the code and i saw
cfg.Section("server").Key("SSH_DOMAIN").SetValue(form.Domain)
cfg.Section("server").Key("DOMAIN").SetValue(form.Domain)
https://github.com/go-gitea/gitea/blob/v1.11.3/routers/install.go#L278
so the variable DOMAIN overwrites (which is localhost by default) and I didn't see a way to define it with env variable (https://github.com/go-gitea/gitea/blob/v1.11.3/docker/root/etc/templates/app.ini ).