forked from AlyShmahell/dalia
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun
More file actions
executable file
·32 lines (26 loc) · 787 Bytes
/
run
File metadata and controls
executable file
·32 lines (26 loc) · 787 Bytes
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
#!/bin/bash
SICSTUS=""
SRC=""
DALI=""
while [[ "$#" -gt 0 ]]; do
case $1 in
--sicstus) SICSTUS="$2"; shift ;;
--src) SRC="$2"; shift ;;
--dali) DALI="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done
echo "SICSTUS: $SICSTUS"
echo "SRC: $SRC"
echo "DALI: $DALI"
if ! command -v docker &> /dev/null; then
echo "install docker engine following the instructions at https://docs.docker.com/engine/install/"
exit 1
fi
docker system prune -f
docker container prune -f
docker image prune -f
sicstus=$SICSTUS src=$SRC dali=$DALI docker compose down --remove-orphans
sicstus=$SICSTUS src=$SRC dali=$DALI docker compose up -d --build --force-recreate
sicstus=$SICSTUS src=$SRC dali=$DALI docker compose logs -f