matomo-org / matomo-org/docker

Support for Docker swarm secrets

Open
#214 0 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
1k
Forks
384
PR merge metrics
No merged PRs in 30d

Description

Hi,

Many Docker images now allow reading values such as passwords from a secret file. This is a very useful feature and is supported by MariaDB, for example. I was wondering if Matomo could support the same. As an example of a docker-compose configuration:

```yaml
secrets:
root_password:
file: ./secrets/root_password.txt
maria_password:
file: ./secrets/maria_password.txt
```

I can then make use of this in the MariaDB service

```yaml
secrets:
- root_password
- maria_password
environment:
- "MYSQL_ROOT_PASSWORD_FILE=/run/secrets/root_password"
- "MYSQL_DATABASE=${MYSQL_DATABASE:-matomo}"
- "MYSQL_USER=${MYSQL_USER:-matomo}"
- "MYSQL_PASSWORD_FILE=/run/secrets/maria_password"
```

I would like to be able to do the same for Matomo as follows:

```yaml
secrets:
- maria_password
environment:
- "MATOMO_DATABASE_PASSWORD_FILE=/run/secrets/maria_password"
```

Contributor guide

No contributing guide indexed for this repository

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 tracing how the Docker image currently reads Matomo database environment variables, then compare that behavior with the Docker Swarm secret-file convention shown in the issue. Verify the proposed MATOMO_DATABASE_PASSWORD_FILE setting with the provided compose configuration and confirm that the database password is read from /run/secrets/maria_password without exposing its contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.