nextcloud / nextcloud/docker

use getenv in configs

Open
#2,429 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement
Dominant language
Shell
Stars
7.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

Simply put, I can understand using the environment variables for initialising NC, but then not using environment variables for continued operations seems silly to me. Why hardcode the values when they are initially read from environment variables anyway?
Additionally using environment variables instead of hardcoding would allow using container secrets directly.
Additionally rotating DB passwords or locations becomes a breeze since it would all be done through environment variables.

Describe the solution you'd like

Star using: 'var' => getenv('ENV_VAR') as much as possible since manually editing config.php can be done eitherway.

Describe alternatives you've considered

Doing it myself, while yes I've done this. I see that this would be likely to benefit other people as well.

Additional context

Since this is an "advanced" image when compared to AIO I can understand potential hesitancy to adopt my suggestions. Yet I believe that it will help since it doesn't detract from original deployment methods in any way.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Docker image configuration and the existing environment-variable initialization that writes values into config.php. Identify which continued-operation settings are still hardcoded and assess whether getenv can safely supply them, including container-secret and rotation cases. Done means the relevant settings consistently read environment variables without removing manual config.php support.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.