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