Skip to content

docs: document setup with read-only config #6348

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

Merged
merged 9 commits into from
Apr 4, 2019
Merged

docs: document setup with read-only config #6348

merged 9 commits into from
Apr 4, 2019

Conversation

nodiscc
Copy link
Contributor

@nodiscc nodiscc commented Mar 17, 2019

Ref. #5704

I don't know what the process to update doc translations is. I could update the french docs if needed.

@codecov-io
Copy link

codecov-io commented Mar 17, 2019

Codecov Report

Merging #6348 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6348      +/-   ##
==========================================
+ Coverage   38.86%   38.86%   +<.01%     
==========================================
  Files         365      365              
  Lines       51389    51389              
==========================================
+ Hits        19970    19972       +2     
+ Misses      28551    28549       -2     
  Partials     2868     2868
Impacted Files Coverage Δ
models/repo_list.go 66.84% <0%> (-1.06%) ⬇️
routers/repo/view.go 42.07% <0%> (+0.99%) ⬆️

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 57ecf09...08278a3. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 17, 2019
@GiteaBot GiteaBot 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 Mar 18, 2019
@lunny lunny added the type/docs This PR mainly updates/creates documentation label Mar 18, 2019
@sapk
Copy link
Member

sapk commented Mar 21, 2019

@nodiscc translation of docs is done directly by updating the file. The french doc is far outdated and a refresh could really be great. Don't hesitate to ping me in your PR if you do so I would gladly review it.

@nodiscc
Copy link
Contributor Author

nodiscc commented Mar 21, 2019

@jolheiser @axifive Thank you, fixed following your review.

@sapk I will work on it, sure.

Wouldn't it make sense for the docs to use a localization system like gettext/transifex (looks like https://github.com/go-gitea/gitea/tree/master/options/locale uses https://crowdin.com/) the one already in use by gitea? Else localized docs will keep lagging behind english ones.

Untranslated/out-of-date paragraphs would simply be displayed in english.

A minimalist alternative is a small banner on all localized pages This documentation may be out of date, please refer to the [english documentation]($pagename.en-us.md) for latest information.

Copy link
Member

@jolheiser jolheiser left a comment

Choose a reason for hiding this comment

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

For consistency, should use Hugo relref function.

@GiteaBot GiteaBot 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 Apr 1, 2019
@jolheiser
Copy link
Member

CI is failing.
My bad, I gave you a wrong filename. It should be command-line.md and not command-line.en-us.md

@techknowlogick
Copy link
Member

@jolheiser updated.

@techknowlogick
Copy link
Member

Seems build is failing from untouched pages. I wonder if version of hugo in image we use has been updated.

@sapk
Copy link
Member

sapk commented Apr 2, 2019

@techknowlogick I run the test on master and seems fine as the PR branch failed. It maybe related to the relative path.
I think it may need to use a relative ../usage/command-line.md or an absolute /doc/usage/command-line.md relref but that strange since it seems to work on other parts. I will try to look into it.

Copy link
Member

@sapk sapk left a comment

Choose a reason for hiding this comment

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

With those changes it should work.

@@ -82,6 +82,7 @@ chmod 770 /etc/gitea
chmod 750 /etc/gitea
chmod 644 /etc/gitea/app.ini
```
If you don't want the web installer to be able to write the config file at all, it is also possible to make the config file read-only for the gitea user (owner/group `root:root`, mode `0660`), and set `INSTALL_LOCK = true`. In that case all database configuration details must be set beforehand in the config file, as well as the `SECRET_KEY` and `INTERNAL_TOKEN` values. See the [command line documentation]({{< relref "doc/usage/command-line.md" >}}) for information on using `gitea generate secret INTERNAL_TOKEN`.
Copy link
Member

Choose a reason for hiding this comment

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

It seems that for relref you need to include the language. So this should be like this.

Suggested change
If you don't want the web installer to be able to write the config file at all, it is also possible to make the config file read-only for the gitea user (owner/group `root:root`, mode `0660`), and set `INSTALL_LOCK = true`. In that case all database configuration details must be set beforehand in the config file, as well as the `SECRET_KEY` and `INTERNAL_TOKEN` values. See the [command line documentation]({{< relref "doc/usage/command-line.md" >}}) for information on using `gitea generate secret INTERNAL_TOKEN`.
If you don't want the web installer to be able to write the config file at all, it is also possible to make the config file read-only for the gitea user (owner/group `root:root`, mode `0660`), and set `INSTALL_LOCK = true`. In that case all database configuration details must be set beforehand in the config file, as well as the `SECRET_KEY` and `INTERNAL_TOKEN` values. See the [command line documentation]({{< relref "doc/usage/command-line.en-us.md" >}}) for information on using `gitea generate secret INTERNAL_TOKEN`.

And rename the file doc/usage/command-line.md to doc/usage/command-line.en-us.md

@techknowlogick techknowlogick merged commit 0f54f42 into go-gitea:master Apr 4, 2019
@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. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants