Skip to content

Commit

Permalink
fix: mysql8 provisioning scripts (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnagro authored Oct 27, 2023
2 parents 7bc7954 + c133daa commit cd62a99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions provision-enterprise-access.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_access"
port="18270"

Expand All @@ -8,15 +12,15 @@ docker-compose up -d --build

# Wait for MySQL
echo "Waiting for MySQL"
until docker exec -i enterprise_access.db mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null
until docker exec -i enterprise_access.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_access.db mysql -u root -se "CREATE DATABASE enterprise_access;"
docker exec -i enterprise_access.mysql80 mysql -u root -se "CREATE DATABASE IF NOT EXISTS enterprise_access;"

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

0 comments on commit cd62a99

Please sign in to comment.