Service required changed startup
[aaf/authz.git] / auth / docker / drun.sh
1 #!/bin/bash drun.sh
2 . d.props
3
4 if [ "$1" == "" ]; then
5   AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'`
6 else
7   AAF_COMPONENTS=$1
8 fi
9   
10 for AAF_COMPONENT in ${AAF_COMPONENTS}; do 
11         case "$AAF_COMPONENT" in
12                 "service") PORTMAP="8100:8100";;
13                 "locate") PORTMAP="8095:8095";;
14                 "oauth") PORTMAP="8140:8140";;
15                 "gui") PORTMAP="8200:8200";;
16                 "cm") PORTMAP="8150:8150";;
17                 "hello") PORTMAP="8130:8130";;
18                 "fs") PORTMAP="80:8096";;
19         esac
20         
21         echo Starting aaf_$AAF_COMPONENT...
22         docker run  \
23           -d \
24           --name aaf_$AAF_COMPONENT \
25           --hostname="$HOSTNAME" \
26           --add-host="$CASS_HOST" \
27           --publish $PORTMAP \
28           --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \
29           --link aaf_cass:cassandra \
30           ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
31 done
32 #                 --add-host="$HOSTNAME:$HOST_IP" \