-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to do all the (first time) database initialisation
The script vcan be safely run multiple times, e.g. to upgrade the database schema for new versions, or to update the middleware configuration
- Loading branch information
Showing
4 changed files
with
58 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Get this script's directory | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
echo "Initializing middleware and gateway databases" | ||
docker compose exec middleware /var/www/html/bin/console doctrine:migrations:migrate --env=prod --em=deploy --no-interaction | ||
|
||
echo "Initializing webauthn database" | ||
docker compose exec webauthn /var/www/html/bin/console doctrine:migrations:migrate --env=prod --no-interaction | ||
|
||
echo "Pushing middleware configuration" | ||
sh "${DIR}/middleware/middleware-push-config.sh" | ||
|
||
echo "Pushing middleware whitelist" | ||
sh "${DIR}/middleware/middleware-push-whitelist.sh" | ||
|
||
echo "Pushing middleware institution configuration" | ||
sh "${DIR}/middleware/middleware-push-institution.sh" | ||
|
||
echo "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters