-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalfresco.sh
executable file
·49 lines (42 loc) · 945 Bytes
/
alfresco.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
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
export COMPOSE_FILE_PATH="${PWD}/docker/docker-compose.yml"
start() {
docker volume create weller-acs-volume
docker volume create weller-db-volume
docker volume create weller-ass-volume
docker-compose -f "$COMPOSE_FILE_PATH" --env-file ./docker/.env up --build -d
}
down() {
if [ -f "$COMPOSE_FILE_PATH" ]; then
docker-compose -f "$COMPOSE_FILE_PATH" --env-file ./docker/.env down
fi
}
purge() {
docker volume rm -f weller-acs-volume
docker volume rm -f weller-db-volume
docker volume rm -f weller-ass-volume
}
tail() {
docker-compose -f "$COMPOSE_FILE_PATH" --env-file ./docker/.env logs -f
}
tail_all() {
docker-compose -f "$COMPOSE_FILE_PATH" --env-file ./docker/.env logs --tail="all"
}
case "$1" in
start)
start
tail
;;
stop)
down
;;
purge)
down
purge
;;
tail)
tail
;;
*)
echo "Usage: $0 {start|stop|purge|tail}"
esac