You can generate password using openssl rand -base64 or openssl rand -hex, and store that to folder .secrets
foo@bar $ openssl rand -base64 48 | tr -dc 'A-Za-z0-9' | head -c 24
8oXFj6d6OpPsiCsAqH6WUnDtBefore using the random password, make sure to edit it in the compose file, with the following example. See docs for more information.
secret:
MYSQL_ROOT_PASSWORD:
file: '.secrets/mysql_root_passwd.txt'
services:
mariadb:
environment:
- MYSQL_ROOT_PASSWORD_FILE: /run/secrets/MYSQL_ROOT_PASSWORD
secret:
- MYSQL_ROOT_PASSWORDSee installation docs - github.com/FiloSottile/mkcert