Configuration Agent and MS for AAF
[aaf/authz.git] / auth / docker / drun.sh
index b4c64d0..a7378b7 100644 (file)
@@ -1,7 +1,19 @@
-#!/bin/bash drun.sh
+#!/bin/bash 
 # Pull in Variables from d.props
 . ./d.props
 
+# Create Volumes, if not exist already
+for VOL in aaf_config aaf_cass_data; do
+  HAS_VOLUME=`docker volume ls | grep $VOL`
+  if [ "$HAS_VOLUME" = "" ]; then
+    docker volume create --name $VOL
+  fi
+done
+       docker run  \
+          -d \
+          --name aaf_config \
+          --mount 'type=volume,src=aaf_config,dst=/opt/app/osaaf,volume-driver=local' \
+          ${ORG}/${PROJECT}/aaf_agent:${VERSION}
 
 if [ "$1" == "" ]; then
   AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'`
@@ -41,7 +53,7 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do
        echo Starting aaf_$AAF_COMPONENT...
 
        docker run  \
-         -i \
+         -d \
          --name aaf_$AAF_COMPONENT \
          --hostname="${AAF_COMPONENT}.aaf.osaaf.org" \
          --add-host="$HOSTNAME:$HOST_IP" \
@@ -49,5 +61,5 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do
          ${LINKS} \
          --publish $PORTMAP \
          --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \
-         ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} 
+         ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} 
 done