Update Moodle configuration to use MARIADB environment variables

This commit is contained in:
Théophile Diot 2024-12-30 20:16:47 +00:00
parent d4caf6ac14
commit 04af5fd531
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
2 changed files with 10 additions and 10 deletions

View file

@ -18,7 +18,7 @@ services:
- MOODLE_DATABASE_HOST=mydb
- MOODLE_DATABASE_NAME=moodle
- MOODLE_DATABASE_USER=user
- MOODLE_DATABASE_PASSWORD=db-user-pwd # replace with a stronger password (must match MYSQL_PASSWORD)
- MOODLE_DATABASE_PASSWORD=db-user-pwd # replace with a stronger password (must match MARIADB_PASSWORD)
labels:
- bunkerweb.SERVER_NAME=www.example.com
- bunkerweb.USE_REVERSE_PROXY=yes
@ -34,10 +34,10 @@ services:
aliases:
- mydb
environment:
- MYSQL_ROOT_PASSWORD=db-root-pwd # replace with a stronger password
- MYSQL_DATABASE=moodle
- MYSQL_USER=user
- MYSQL_PASSWORD=db-user-pwd # replace with a stronger password (must match MOODLE_DATABASE_PASSWORD)
- MARIADB_ROOT_PASSWORD=db-root-pwd # replace with a stronger password
- MARIADB_DATABASE=moodle
- MARIADB_USER=user
- MARIADB_PASSWORD=db-user-pwd # replace with a stronger password (must match MOODLE_DATABASE_PASSWORD)
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci

View file

@ -16,7 +16,7 @@ services:
- MOODLE_DATABASE_HOST=mydb
- MOODLE_DATABASE_NAME=moodle
- MOODLE_DATABASE_USER=user
- MOODLE_DATABASE_PASSWORD=db-user-pwd # replace with a stronger password (must match MYSQL_PASSWORD)
- MOODLE_DATABASE_PASSWORD=db-user-pwd # replace with a stronger password (must match MARIADB_PASSWORD)
deploy:
placement:
constraints:
@ -34,10 +34,10 @@ services:
networks:
- bw-services
environment:
- MYSQL_ROOT_PASSWORD=db-root-pwd # replace with a stronger password
- MYSQL_DATABASE=moodle
- MYSQL_USER=user
- MYSQL_PASSWORD=db-user-pwd # replace with a stronger password (must match MOODLE_DATABASE_PASSWORD)
- MARIADB_ROOT_PASSWORD=db-root-pwd # replace with a stronger password
- MARIADB_DATABASE=moodle
- MARIADB_USER=user
- MARIADB_PASSWORD=db-user-pwd # replace with a stronger password (must match MOODLE_DATABASE_PASSWORD)
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci
deploy: