forked from DSpace/dspace-angular
-
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.
[devOps] import/erase/deploy workflows refactored
- Loading branch information
jm
committed
Nov 7, 2023
1 parent
d89d199
commit e5dbe1f
Showing
4 changed files
with
109 additions
and
37 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,43 @@ | ||
#!/bin/bash | ||
echo "testing existence of envfile" | ||
if [[ "x$ENVFILE" == "x" ]]; then | ||
export ENVFILE=$(pwd)/envs/.default | ||
echo "setting up new envfile" | ||
echo "Using default envfile" | ||
fi | ||
|
||
PROJECT=${1:-unnamed_dspace} | ||
|
||
echo "Using envfile: [$ENVFILE] for project: [$PROJECT]" | ||
|
||
source $ENVFILE | ||
|
||
# docker-compose does not pull those that have `build` section?! | ||
echo "=====" | ||
docker pull $DSPACE_UI_IMAGE | ||
|
||
pushd ../.. | ||
echo "=====" | ||
docker compose --env-file $ENVFILE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml pull | ||
docker compose --env-file $ENVFILE -p ${1:-unnamed_dspace} -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --no-build | ||
docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --no-build --remove-orphans | ||
popd | ||
|
||
# Create admin user | ||
# set DOCKER_OWNER to match our image (see cli.yml) | ||
pushd ../.. | ||
#docker compose --env-file $ENVFILE -p ${1:-unnamed_dspace} -f docker/matomo-w-db.yml pull | ||
#docker compose --env-file $ENVFILE -p ${1:-unnamed_dspace} -f docker/matomo-w-db.yml up -d --no-build | ||
docker compose --env-file $ENVFILE -p ${1:-unnamed_dspace} -f docker/cli.yml run --rm dspace-cli create-administrator -e [email protected] -f admin -l user -p admin -c en -o dataquest | ||
docker compose --env-file $ENVFILE -p ${1:-unnamed_dspace} -f docker/cli.yml run --rm dspace-cli user --add -m user@test.edu -g meno -s priezvisko -l en -p user -o dataquest | ||
docker compose --env-file $ENVFILE -p ${1:-unnamed_dspace} -f docker/cli.yml run --rm dspace-cli version | ||
popd | ||
echo "=====" | ||
#docker compose --env-file $ENVFILE -p $PROJECT -f docker/matomo-w-db.yml pull | ||
#docker compose --env-file $ENVFILE -p $PROJECT -f docker/matomo-w-db.yml up -d --no-build | ||
docker compose --env-file $ENVFILE -p $PROJECT -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en -o dataquest | ||
docker compose --env-file $ENVFILE -p $PROJECT -f docker/cli.yml run --rm dspace-cli user --add -m [email protected] -g meno -s priezvisko -l en -p user -o dataquest | ||
docker compose --env-file $ENVFILE -p $PROJECT -f docker/cli.yml run --rm dspace-cli version | ||
|
||
echo "=====" | ||
echo "Logs" | ||
docker compose --env-file $ENVFILE -p $PROJECT -f docker/docker-compose.yml -f docker/docker-compose-rest.yml logs -n 50 || true | ||
popd | ||
|
||
echo "=====" | ||
echo "Copy assetstore" | ||
docker cp assetstore dspace${INSTANCE}:/dspace/ | ||
|
||
echo "=====" | ||
echo "Finished start.sh" |