nextcloud / nextcloud/docker

Support for docker secrets on first initialization broken

Open
#1,148 22 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug feature: auto config (Docker secrets) feature: installing needs review
Dominant language
Shell
Stars
7.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Unfortunately the problem described in #385 reappeared again...
The exact thing happens, that I describe in my comment on #385

Unfortunately this seems to be broken again...

Unknown

When built with this docker-compose . yaml it still asks for database configuration. If built with an inline password on the other hand, it works like intended.

---
version: '3.3'

services:
nextcloud-db:
image: mariadb
container_name: nextcloud-db
command: --transaction-isolation=READ-COMMITTED --log-bin=ROW
networks:
- nextcloud-db
restart: always
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_root_password
MYSQL_PASSWORD_FILE: /run/secrets/mysql_user_password
 // commented out // MYSQL_PASSWORD: 345Test
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_INITDB_SKIP_TZINFO: 1
secrets:
- mysql_root_password
- mysql_user_password
--truncated--

nextcloud-app:
image: nextcloud
container_name: nextcloud-app
restart: always
depends_on:
- nextcloud-db
environment:
MYSQL_HOST: nextcloud-db
MYSQL_USER: nextcloud
MYSQL_DATABASE: nextcloud
MYSQL_PASSWORD_FILE: /run/secrets/mysql_user_password
// commented out // MYSQL_PASSWORD: 345Test
secrets:
- mysql_user_password
--truncated--

secrets:
mysql_root_password:
file: /opt/docker/secrets/mysql_root_password
mysql_user_password:
file: /opt/docker/secrets/mysql_user_password`

I would be very glad if someone might help me or point me in the right direction!

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 with the docker-compose configuration shown in the issue and compare its behavior with the setup described in #385. Reproduce first initialization using Docker secret *_FILE variables instead of inline passwords, then trace the image's initialization entry point. Done means the setup completes without prompting for database configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.