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

📝 Include instructions on how to configure the server with Env Variables #9143

Closed
wants to merge 1 commit into from

Conversation

LeoColman
Copy link

This commit adds to the docs instructions on how to configure a Nextcloud instance to use Environment configuration when values aren't present in config.php.

This should close nextcloud/docker#1544 and nextcloud/docker#1465
It should also render nextcloud/docker#1795 unnecessary.

Signed-off-by: Leonardo Colman [email protected]

This commit adds to the docs instructions on how to configure a Nextcloud instance to use Environment configuration when values aren't present in config.php.

This should close nextcloud/docker#1544 and nextcloud/docker#1465
It should also render nextcloud/docker#1795 unnecessary.

Signed-off-by: Leonardo Colman <[email protected]>
@PrivatePuffin
Copy link

Please also document how this works with dicts and lists.

@LeoColman
Copy link
Author

Hi @Ornias1993 !

Absolutely!
Although I don't really know how it works with dicts and lists.
Could you give me an example?

@PrivatePuffin
Copy link

Hi @Ornias1993 !

Absolutely! Although I don't really know how it works with dicts and lists. Could you give me an example?

No idea.

@LeoColman
Copy link
Author

I'll do some exploring :D

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

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

Hey 👋,

thanks for your pull request 👍

@PVince81 @CarlSchwan I have mixed feelings about adding this section to the documentation. Afaik we don't recommend this and it's not really done (for example lists are not supported or type conversions via env).

@LeoColman
Copy link
Author

What would be the correct way to configure these variables using the environment?

@kesselb
Copy link
Contributor

kesselb commented Sep 6, 2022

What would be the correct way to configure these variables using the environment?

I'm afraid we don't have something else 🙈
NC_ works for some configuration options in config.php.

Some examples:

It does not work for trusted_domains or objectstore (because it's an array)

It does not work for 'sharing.enable_share_accept' (because an boolean is expected but the variable from env is always a string and 'false' is true.

It may work for sharing.mail_link_password_expiration_interval (but the . seems not to work everywhere: https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names)

I'm okay with updating the documentation but then usually people start using a feature and some people might be confused when this way does not work for everything. A library like https://github.com/symfony/dotenv may help us to cover most of the cases. Let's see what Vincent and Carl think about your PR.

@LeoColman
Copy link
Author

I agree with you:

A library like symfony/dotenv may help us to cover most of the cases.

Having proper implementation is better, even better if we delegate it to somewhere else xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning about default_phone_region
4 participants