-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecute.sh
37 lines (29 loc) · 949 Bytes
/
execute.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#set -eu pipefail
expose COMPOSE_PROJECT_NAME="poc-pkp-ojs"
SKIP_BUILD_APP=false
CLEAN_OLD_EXECUTION=""
while :; do
case $1 in
-sb|--skip-build) SKIP_BUILD_APP=true ;;
-ce|--clean-old-execution) CLEAN_OLD_EXECUTION="--vlomues" ;;
*) break
esac
shift
done
if [[ "$SKIP_BUILD_APP" == "false" ]] ; then
bash .ci/build.sh
else
echo "Build skiped"
fi
echo "Remove old docker images and clean old executions"
docker compose -f .dev/docker-compose.yml down --remove-orphans $CLEAN_OLD_EXECUTION
[[ -n "$(docker image ls -aqf=reference='poc-pkp-ojs*/*')" ]] && docker image rm -f $(docker image ls -aqf=reference="poc-pkp-ojs*/*")
echo "Start ojs"
docker compose -f .dev/docker-compose.yml up
# For enter job backup container
# docker exec -it poc-pkp-ojs-job-backup-1 ash
# For enter ojs container
# docker exec -it poc-pkp-ojs-ojs-1 ash
# For enter postgres container
# docker exec -it poc-pkp-ojs-postgres-1 ash