docs: Some fixes for Configuration page and remove Env Var reference page #1516
No reviewers
continuwuation/Owners
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity!1516
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "stratself/continuwuity:stratself/docs-config-env-var-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request attempts to improve docs for the Configuration and the Env Var Reference pages. Namely, it:
I'm thinking there may need to be a separate section called
Runtime configurationwhere both--executeand--maintenanceflags are to be documented. Let me know if that makes senseRelates #1508
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
@ -1,46 +1,10 @@# Environment Variablesthe existence of this file bothers me. it isn't autogenerated like the other reference documentation, and I think we'd be better off removing it and instead adding info on how to convert a config option to an env var name.
Removed the file and references to it. The configuration.mdx docs should sufficiently demonstrate the conversions but let me know if any other ideas
b4d2cbc86073618fdbd3@ -6,3 +6,2 @@Continuwuity uses a config file for the majority of the settings, but also supportssetting individual config options via commandline.Continuwuity uses a config file for the majority of the settings. This is the recommended way to configure Continuwuity. Please refer to the [example config file](./reference/config.mdx) for all of those settings.This should be "its settings" rather than "the settings" in the first sentence, and while we're here, I'd like to question the word "majority" - what does it not use the config file for?
Changed wording to "all of its settings"
@ -10,3 +9,1 @@Please refer to the [example configfile](./reference/config.mdx) for all of thosesettings.The config file to use can be specified on the commandline when running Continuwuity by specifying the `-c`/ `--config` flag:i would suggest something like
You left "to be used by" in there. Ideally, it should be replaced with "Continuwuity should use"
@ -17,2 +11,2 @@used; see [the section on environment variables](#environment-variables) formore information.```bash~$ ./conduwuit -c /path/to/continuwuity.tomlThe prompts are not used anywhere else in the documentation to my knowledge.
Do you prefer if these
~$are introduced in docs or not?I would prefer to leave them out, personally.
@ -24,1 +17,3 @@server_name=\"example.com\"`.## Environment variablesAll of the config file settings can also be specified by using environment variables. This makes it ideal for containerised deployments and infrastructure-as-code scenarios."config file settings" -> "config options"
"This makes it ideal" -> "This is ideal"
@ -25,0 +18,4 @@All of the config file settings can also be specified by using environment variables. This makes it ideal for containerised deployments and infrastructure-as-code scenarios.The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to the configuration file with the syntaxes as demonstrated below:You may not need to explicitly mention the capitalised nature of environment variables, since that is the standard, but that's up to you. As for the second sentence, "syntax" is uncountable, with the special term "syntaxes" having been created for talking about multiple languages. I would go for something like
@ -25,0 +21,4 @@The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to the configuration file with the syntaxes as demonstrated below:```bash# Top-level configs (those inside the [global] section) are simply capitalizedPrefer "options" to "configs"
@ -25,0 +36,4 @@# Alternatively, you can pass a JSON object to define the entire section# This maps to the [global.well_known] sectionCONTINUWUITY_WELL_KNOWN={ client=https://example.com,server=example.com:443 }Does this not need to be quoted as well?
They do, I thought they didn't because
docker-compose.ymlaccepts unquoted strings@ -25,0 +46,4 @@- `CONDUWUIT_*` (compatibility)- `CONDUIT_*` (legacy)So, for example, the environment variable `CONTINUWUITY_CONFIG` can also be expressed as `CONDUWUIT_CONFIG` or `CONDUIT_CONFIG`.Either drop "So," or move the "for example" clause to the end of the sentence.
@ -43,0 +77,4 @@## Execute startup commandsContinuwuity supports running admin commands on startup using the commandline argument `--execute`. The syntax of this is a standard admin command without the `!admin` prefix. For example, to create a new user:It is in times like these that I wish Forgejo supported suggestions.
Applied your sentence
@ -43,0 +80,4 @@Continuwuity supports running admin commands on startup using the commandline argument `--execute`. The syntax of this is a standard admin command without the `!admin` prefix. For example, to create a new user:```./conduwuit --execute "users create_user june"It may be worth adding a comment here to drive home the point, like
Of course, I know much of that is the original wording, so it's up to you whether this PR is the right place to fix the phrasing. I just felt like it was a good opportunity.
docs: Some fixes for Configuration and Env Var reference sectionto docs: Some fixes for Configuration page and remove Env Var reference page07f6c38cafd52404ead6Would it also be an idea to have each env var in the example config? I.e.
@s1lv3r, I believe that defeats the purpose of documenting how to convert between them. Ideally you shouldn't have to maintain the list manually either. If you wanted to have a list of both, it would be better to generate the environment variables from the config, which I believe Jade was discussing not long ago.
@ -25,0 +18,4 @@All of the options in the config file can also be specified by using environment variables. This is ideal for containerised deployments and infrastructure-as-code scenarios.The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to config options in the ways demonstrated below:"names is" -> "names are"
@ -25,0 +21,4 @@The environment variable names is represented in all caps and prefixed with `CONTINUWUITY_`. They are mapped to config options in the ways demonstrated below:```bash# Top-level options (those inside the [global] section) are simply capitalizedI should've noticed this last time but earlier you use "containerised" and here you use "capitalized". I believe the rest of the docs use English English, so it should be "capitalised" here.
@ -25,0 +36,4 @@# Alternatively, you can pass a quoted JSON object to define an entire section# This maps to the [global.well_known] sectionCONTINUWUITY_WELL_KNOWN="{ client=https://example.com,server=example.com:443 }"Does this example actually work? You mention a quoted JSON object, but that is not even close to being JSON. In fact, it's closer to being Nix.
If it does, the section above will need to be reworded. If it does not, the example will need to be changed.
I have confirmed this worked with the container, at least
Curling
127.0.0.1/.well-known/matrix/(client|server)yields exact results.Do let me know if it works for any deployment you can test on. I'll edit the "JSON object" part because it is not.
Looks like it's called a
structhere. Shall provisionally call the env var as such.@ -37,3 +65,1 @@Continuwuity supports running admin commands on startup using the commandlineargument `--execute`. The most notable use for this is to create an admin useron first startup.The above configuration methods are prioritized, in descending order, as below:This should be "prioritised". Although I just double checked and there are some instances of International English in the documentation. If the maintainers have a particular preference that should be made consistent.
Changed all of page to English English for page consistency
559b1c701e38fdfd929fLooks good to me. I'm still not sure if the struct thing is intentional, nor if we should bother mentioning it for fear of encouraging its use, but it it works it works I suppose.
38fdfd929feb9b9ee937Re-approval following the force push. I would still be cautious about documenting the structs situation, but I leave that to your discretion.
@lveneris FYI these structs are used a lot in the composes so imo they should be included
eb9b9ee93796be3924f9PTAL