From 54eb6359b67f67bae7050fc38666defa8bc9a3cc Mon Sep 17 00:00:00 2001 From: Bradford Powell Date: Wed, 20 Dec 2023 21:38:52 -0500 Subject: [PATCH] create testing db if DB_DATABASE_TEST is set --- .docker/mysql/db-init/create_testing_db.sh | 15 +++++++++++++++ docker-compose.yml | 1 + 2 files changed, 16 insertions(+) create mode 100644 .docker/mysql/db-init/create_testing_db.sh diff --git a/.docker/mysql/db-init/create_testing_db.sh b/.docker/mysql/db-init/create_testing_db.sh new file mode 100644 index 00000000..9be9414c --- /dev/null +++ b/.docker/mysql/db-init/create_testing_db.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -eo pipefail +shopt -s nullglob + +if [[ ! -v DB_DATABASE_TEST ]]; then + echo '$DB_DATABASE_TEST is not defined, skipping testing db creation' +else + + source /usr/local/bin/docker-entrypoint.sh + + docker_process_sql --database=mysql <