forked from intrahealth/client-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.sh
29 lines (20 loc) · 806 Bytes
/
compose.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
composeFilePath=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
if [ "$1" == "init" ]; then
docker-compose -f "$composeFilePath"/docker-compose.yml up -d fhir es
# Set up the openhim
# "$composeFilePath"/initiateReplicaSet.sh
# Wait
sleep 100
docker-compose -f "$composeFilePath"/docker-compose.yml up -d opencr
elif [ "$1" == "up" ]; then
docker-compose -f "$composeFilePath"/docker-compose.yml up -d fhir es
# Wait
sleep 20
docker-compose -f "$composeFilePath"/docker-compose.yml up -d opencr
elif [ "$1" == "down" ]; then
docker-compose -f "$composeFilePath"/docker-compose.yml stop
elif [ "$1" == "destroy" ]; then
docker-compose -f "$composeFilePath"/docker-compose.yml down -v
else
echo "Valid options are: init, up, down, or destroy"
fi