-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdcompose
More file actions
executable file
·44 lines (39 loc) · 969 Bytes
/
dcompose
File metadata and controls
executable file
·44 lines (39 loc) · 969 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
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# set the COMPOSE_FILE env var
COMPOSE_FILE=docker-compose.yml
dc="docker compose"
while true; do
case "$1" in
minio) # adds docker-compose.minio.yml COMPOSE_FILE env var
echo "Addin minio yaml file"
COMPOSE_FILE=$COMPOSE_FILE:docker-compose.minio.yml
shift
;;
geoinit) # adds docker-compose.geoinit.yml to COMPOSE_FILE env var
echo "Addin geoinit yaml file"
COMPOSE_FILE=$COMPOSE_FILE:docker-compose.geoinit.yml
shift
;;
up) # 'up' option
dc="$dc up"
shift
;;
down) # 'down' option
dc="$dc down"
shift
;;
--build) # --build option
dc="$dc --build"
shift
;;
help) # this message
echo "$0 usage:" && grep .\)\ # $0; printf "\nexample: ./dcompose up --build minio geoinit\n"; exit 0
;;
*)
break
;;
esac
done
export COMPOSE_FILE
# echo $dc
eval "$dc"