Skip to content

Added fetching autoconfig data from Docker secrets#1516

Merged
J0WI merged 2 commits into
nextcloud:masterfrom
tushev:master
Nov 29, 2021
Merged

Added fetching autoconfig data from Docker secrets#1516
J0WI merged 2 commits into
nextcloud:masterfrom
tushev:master

Conversation

@tushev

@tushev tushev commented Jun 15, 2021

Copy link
Copy Markdown
Contributor

Signed-off-by: Simon Tushev tushev@users.noreply.github.com

This should solve #1148

This is my first PR. I'm not very familiar with Docker, however, I hope that this solves the issue.
I changed only .config/autoconfig.php , as far as I can understand these changes should propagate to, say, 21.0/apache/config/autoconfig.php automatically.

Please correct me if I'm wrong.

Another question to consider is the security of trim(file_get_contents(getenv('MYSQL_DATABASE_FILE')));. Theoretically, it is possible to specify any file, however, the very same approach is used in entrypoint.sh. Both the installation script and Docker secrets should be controlled by a privileged user. I see no issues with this, however, I'm not a security expert and thus I request a second opinion.

Signed-off-by: Simon Tushev <tushev@users.noreply.github.com>

@J0WI J0WI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd check first for the _FILE and then fallback to the env.

@tushev

tushev commented Jul 23, 2021

Copy link
Copy Markdown
Contributor Author

@J0WI Should it be a new pull request or this one? (a novice's question :)

@J0WI

J0WI commented Jul 23, 2021

Copy link
Copy Markdown
Contributor

You can update this one

Signed-off-by: Simon Tushev <tushev@users.noreply.github.com>
@tushev

tushev commented Jul 27, 2021

Copy link
Copy Markdown
Contributor Author

Done, also added some info to README.md

@J0WI J0WI merged commit 2857b4b into nextcloud:master Nov 29, 2021
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Nov 29, 2021
Changes:

- https///github.com/nextcloud/docker/commit/9059726: Runs update.sh
- https///github.com/nextcloud/docker/commit/2857b4b: Added fetching autoconfig data from Docker secrets (https///github.com/nextcloud/docker/pull/1516)
- https///github.com/nextcloud/docker/commit/f4dbcf5: add rewrite rule from official docs to nginx examples (https///github.com/nextcloud/docker/pull/1635)
- https///github.com/nextcloud/docker/commit/6e54048: Add OVERWRITECLIURL env var (https///github.com/nextcloud/docker/pull/1622)
- https///github.com/nextcloud/docker/commit/d82bc95: Switch to new nginx companion registry. (https///github.com/nextcloud/docker/pull/1571)
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 1, 2021
Changes:

- https///github.com/nextcloud/docker/commit/5a189c7: Runs update.sh
- https///github.com/nextcloud/docker/commit/484b2c5: Alpine 3.15 (https///github.com/nextcloud/docker/pull/1643)
- https///github.com/nextcloud/docker/commit/e2dc98d: Nextcloud 23 (https///github.com/nextcloud/docker/pull/1642)
- https///github.com/nextcloud/docker/commit/9059726: Runs update.sh
- https///github.com/nextcloud/docker/commit/2857b4b: Added fetching autoconfig data from Docker secrets (https///github.com/nextcloud/docker/pull/1516)
- https///github.com/nextcloud/docker/commit/f4dbcf5: add rewrite rule from official docs to nginx examples (https///github.com/nextcloud/docker/pull/1635)
- https///github.com/nextcloud/docker/commit/6e54048: Add OVERWRITECLIURL env var (https///github.com/nextcloud/docker/pull/1622)
- https///github.com/nextcloud/docker/commit/d82bc95: Switch to new nginx companion registry. (https///github.com/nextcloud/docker/pull/1571)
ananace pushed a commit to ananace/docker-nextcloud that referenced this pull request May 10, 2024
* Added fetching autoconfig data from Docker secrets

Signed-off-by: Simon Tushev <tushev@users.noreply.github.com>

* Docker secrets now have priority over ENV variables; improved README.md

Signed-off-by: Simon Tushev <tushev@users.noreply.github.com>
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.

2 participants