Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
always update sql password in case of kv change
Browse files Browse the repository at this point in the history
  • Loading branch information
Physer committed Dec 17, 2024
1 parent 5b170ac commit b207e03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infrastructure/cms/Dockerfile.init
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM mysql:latest

ENTRYPOINT mysql --protocol=tcp -h $SQL_HOST -u$SQL_ROOT_USER -p$SQL_ROOT_PASSWORD -e "CREATE USER IF NOT EXISTS '$SQL_CMS_USER'@'%' IDENTIFIED BY '$SQL_CMS_PASSWORD'; GRANT ALL PRIVILEGES ON $SQL_DATABASE_NAME . * TO '$SQL_CMS_USER'@'%'; FLUSH PRIVILEGES;"
ENTRYPOINT mysql --protocol=tcp -h $SQL_HOST -u$SQL_ROOT_USER -p$SQL_ROOT_PASSWORD -e "CREATE USER IF NOT EXISTS '$SQL_CMS_USER'@'%' IDENTIFIED BY '$SQL_CMS_PASSWORD'; ALTER USER '$SQL_CMS_USER' IDENTIFIED BY '$SQL_CMS_PASSWORD'; GRANT ALL PRIVILEGES ON $SQL_DATABASE_NAME . * TO '$SQL_CMS_USER'@'%'; FLUSH PRIVILEGES;"

0 comments on commit b207e03

Please sign in to comment.