refactor(docker): New mariadb_init service

Provides a single source of truth for mariadb database
initialization. Previously, php-fpm and fastapi were
racing against each other; while this wasn't an issue,
it was very messy.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-09-08 17:14:55 -07:00
parent 2e3f69ab12
commit 0fd31b8d36
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
5 changed files with 64 additions and 40 deletions

View file

@ -3,8 +3,6 @@ set -eou pipefail
MYSQL_DATA=/var/lib/mysql
[[ -z "$DB_HOST" ]] && DB_HOST="localhost"
mariadb-install-db --user=mysql --basedir=/usr --datadir=$MYSQL_DATA
# Start it up.