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

Explain how to use the new dynamic config #50

Merged
merged 3 commits into from
Mar 23, 2022
Merged

Explain how to use the new dynamic config #50

merged 3 commits into from
Mar 23, 2022

Conversation

peterrus
Copy link
Contributor

Explain how to use the new dynamic config introduced in #25 and remove references to the old style. I noticed the docs were not in sync with how the configuration system works now.

Get your web push keys and copy them to `secret.exs`:

```
docker-compose run --rm web mix web_push.gen.keypair
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done automatically in the new dynamic config afaik.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would run this religiously but never thought it did anything. Seems I was right.

By default the provided `docker-compose.yml` file mounts `config.exs` in the Pleroma container, this file is a dynamic configuration that sources some values from the environment variables provided to the container (variables like `ADMIN_EMAIL` etc.).

For those that want to change configuration that is not exposed through environment variables there is the option to mount the `config-override.exs` file which can than be modified to your satisfaction. Values set in this file will override anything set in `config.exs`. The override file provided in this repository disables new registrations on your instance, as an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it'd be useful to have an override file so people don't have to modify the upstream config.exs in their local clones. The dynamic config already tries to include this file, so I just had to mount it into the container.

@peterrus
Copy link
Contributor Author

@excodex @felix-two-tone This builds on your earlier work so feel free to let me know if you have any opinions on this.

@felix-two-tone
Copy link
Contributor

felix-two-tone commented Mar 17, 2022

So yea, this answers some questions that I had about what was going on with the two configs involved (Guess I should read more on this repo). So question, does this part of the process even need to occur anymore? I didn't really understand in the README.md that it was asking you to create this config file, it seemed to me that it never did anything.

Edit: wrong line

Configure Pleroma. Copy the following to `config/secret.exs`:

@peterrus
Copy link
Contributor Author

@felix-two-tone nope, you don't need to create that config file anymore as it is included in the repo already and sources some values from the environment variables. If you want to configure things that are not configurable through environment variables you can use the config-override I added in this PR.

I have also removed the instructions to create that config/secret.exs file as it does indeed not get used and thus does nothing. Just use the config-override or hack the included dynamic config if you're so inclined (but I would not recommend that because your changes will conflict with any changes to that file being done upstream).

@peterrus
Copy link
Contributor Author

@angristan should be ready to merge unless you have any questions or remarks.

@angristan angristan merged commit 883a3cb into angristan:master Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants