From f228e0554bba6958486e10e919067ae211ad3c67 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Fri, 24 May 2024 01:33:39 +0200 Subject: [PATCH] Use secrets for database service --- docker-compose.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2bbf9b7..333df69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,10 @@ x-wordpress-configuration-env: &wordpress-configuration-env networks: default: +secrets: + database_root_password: + file: ./.secrets/database_root_password.txt + services: wordpress: image: ghcr.io/n0rthernl1ghts/wordpress:6.5.3 @@ -106,10 +110,12 @@ services: MARIADB_INIT_DATABASES: wordpress MARIADB_INIT_USERS: wordpress MARIADB_PASSWORD: wordpress # CHANGE THIS! - MARIADB_ROOT_PASSWORD: 'super-secure-root-password123' # CHANGE THIS! + FILE__MARIADB_ROOT_PASSWORD: /run/secrets/database_root_password FORCE_CONFIG_OVERWRITE: 1 volumes: - ./data/database/config:/config - ./data/database/data:/var/lib/mysql + secrets: + - database_root_password networks: default: