Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mysql8 provisioning scripts #165

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions provision-enterprise-subsidy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set -euf -o pipefail

. "$DEVSTACK_WORKSPACE/devstack/scripts/colors.sh"

name="enterprise-subsidy"
port="18280"

Expand All @@ -9,15 +13,15 @@ make dev.up

# Wait for MySQL
echo "Waiting for MySQL"
until docker exec -i enterprise-subsidy.db mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null
until docker exec -i enterprise-subsidy.mysql80 mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null
do
printf "."
sleep 1
done
sleep 5

# Create the database
docker exec -i enterprise-subsidy.db mysql -u root -se "CREATE DATABASE enterprise_subsidy;"
docker exec -i enterprise-subsidy.mysql80 mysql -u root -se "CREATE DATABASE IF NOT EXISTS enterprise_subsidy;"

# Run migrations
echo -e "${GREEN}Running migrations for ${name}...${NC}"
Expand Down
Loading