-
Notifications
You must be signed in to change notification settings - Fork 42
/
start
executable file
·33 lines (27 loc) · 893 Bytes
/
start
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
#!/bin/bash -ex
mssql_host=mssql
while getopts :dm:s: opt; do
case $opt in
d) dev_mode=true;;
m) mssql_host=${OPTARG};;
s) secretless_host=${OPTARG};;
\?) echo "Unknown option -$OPTARG"; exit 1;;
esac
done
# If the secretless host is not explicitly set on the command line,
# then use one of the default names (either secretless or
# secretless-dev, depending on whether testing is being done in
# development mode) for the secretless host.
if [[ -z $secretless_host ]]; then
secretless_host=secretless
if [[ "$dev_mode" = true ]]; then
secretless_host=secretless-dev
fi
fi
./stop
docker-compose build
# the order of the services is important. mssql must be up before we start secretless
docker-compose up -d $mssql_host
time ./wait_for_mssql -m $mssql_host
docker-compose logs $mssql_host
docker-compose up -d $secretless_host