-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-alias.sh
More file actions
executable file
·41 lines (41 loc) · 1.3 KB
/
docker-compose-alias.sh
File metadata and controls
executable file
·41 lines (41 loc) · 1.3 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
#!/usr/bin/env bash
# shellcheck source=Scripts/lib/logging.sh
. "$TOPDIR/Scripts/lib/logging.sh"
bootargs=""
docker=""
saved=("$*")
usage="[-dns=<domainname>] [-e,--export=<value>] [-o bootstrap arguments]"
[ $# -eq 0 ] && echo "Usage: $0 ${usage}" && exit 1
while [[ "$#" -gt 0 ]]; do case $1 in
-[eE]*|--export*)
parse_arg_export"$1" "ARG_EXPORT" "argument ARG_EXPORT=\$ARG_EXPORT was exported";;
-[vV]*|--verbose )
echo "Passed params : $0 ${saved[*]}";;
-[oO]*)
bootargs=("${saved[*]}");;
-dns*|-DNS*)
parse_dns_host "$1" "SERVER_NAME" "Domain Server Name";;
-[hH]*|--help )
echo "Usage: $0 ${usage}
-dns=<domainname>
Apache ServerName global directive
-e, --expôrt=<value>
Exports ARG_EXPORT
-v
Verbosity enabled
[other-args]
Passed to docker-compose
"
exit 0;;
*) docker="${docker} $1";;
esac; shift; done
export DB=Mysql
source Scripts/bootstrap.sh "${bootargs[*]}"
if [ ! "$(command -v docker-compose 2> /dev/null)" ]; then Scripts/install-docker-compose.sh; fi
if [ -n "$SERVER_NAME" ]; then
source Scripts/docker_site_conf.sh "$SERVER_NAME"
else
cp -v docker/apache/site-default.conf docker/apache/site.conf
fi
docker-compose "$docker"
sudo cp index-redirect-8000.php /var/www/html/index.php