Skip to content

Commit

Permalink
[MariaDB] Update compose file
Browse files Browse the repository at this point in the history
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
  • Loading branch information
khs1994 committed Feb 11, 2024
1 parent add8e63 commit f902880
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lrew/mariadb/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


x-common:
&common
restart: always
Expand All @@ -24,7 +22,7 @@ services:
image: "${LNMP_LIBRARY_NS:-library}/mariadb:${LNMP_MARIADB_VERSION:-10.11.5}"
environment:
# @link https://github.com/docker-library/docs/tree/master/mariadb#environment-variables
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mariadb_db_root_password
# MYSQL_ROOT_PASSWORD: ${LNMP_MYSQL_ROOT_PASSWORD:-mytest}
MYSQL_DATABASE: ${LNMP_MYSQL_DATABASE:-test}
# MYSQL_USER:
Expand All @@ -44,18 +42,18 @@ services:
- mysqld
- --character-set-server=utf8mb4
secrets:
- db_root_password
- mariadb_db_root_password
# - source: mariadb_conf
# target: /etc/mysql/conf.d/my.cnf
# mode: 0644
# uid: "999"
# gid: "999"
healthcheck:
# test: ["CMD", "mysqladmin", "ping", "-p${LNMP_MYSQL_ROOT_PASSWORD:-mytest}"]
test: ["CMD-SHELL", "mysqladmin ping -p`cat /run/secrets/db_root_password`"]
test: ["CMD-SHELL", "mysqladmin ping -p`cat /run/secrets/mariadb_db_root_password`"]

secrets:
db_root_password:
mariadb_db_root_password:
<< : *common-label
file: ./secrets/${LNMP_DB_ROOT_PASSWORD_PATH:-db_root_password.txt}
# mariadb_conf:
Expand Down

0 comments on commit f902880

Please sign in to comment.