This repository was archived by the owner on Feb 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·60 lines (56 loc) · 1.47 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·60 lines (56 loc) · 1.47 KB
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
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
if [ "$1" != "" ] && [ "$2" != "" ]; then
printf "Executing action: %s on compose: %s\n" "$1" "$2"
else
printf "Usage:\n"
printf " setup.sh [action] [compose]\n\n"
printf " action: --start, --restart, --stop, --clear\n"
printf " compose: media, web, all\n"
fi
case "$1" in
"")
;;
"--start")
command="up -d"
;;
"--restart")
command="restart"
;;
"--stop")
command="stop"
;;
"--clear")
command="down"
;;
esac
case "$2" in
"")
;;
"media"| "web"| "util"| "all")
mkdir -p /home/user/docker/config
printf "Setting up utility containers...\n"
docker compose -f "compose-util/docker-compose.yaml" $command
;;
esac
case "$2" in
"")
;;
"media")
printf "Setting up media containers...\n"
docker compose -f "compose-media/docker-compose.yaml" $command
;;
"web")
printf "Setting up web containers...\n"
docker compose -f "compose-web/docker-compose.yaml" $command
;;
"util")
printf "Setting up util containers...\n"
docker compose -f "compose-util/docker-compose.yaml" $command
;;
"all")
printf "Setting up media containers...\n"
docker compose -f "compose-media/docker-compose.yaml" $command
printf "Setting up web containers...\n"
docker compose -f "compose-web/docker-compose.yaml" $command
;;
esac