Instrumental | 924b18d | 2018-04-05 20:17:18 -0500 | [diff] [blame] | 1 | #!/bin/bash drun.sh |
| 2 | . d.props |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 3 | |
| 4 | if [ "$1" == "" ]; then |
| 5 | AAF_COMPONENTS=`ls ../aaf_${VERSION}/bin | grep -v '\.'` |
| 6 | else |
| 7 | AAF_COMPONENTS=$1 |
| 8 | fi |
| 9 | |
| 10 | for AAF_COMPONENT in ${AAF_COMPONENTS}; do |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 11 | case "$AAF_COMPONENT" in |
| 12 | "service") PORTMAP="8100:8100";; |
Instrumental | 924b18d | 2018-04-05 20:17:18 -0500 | [diff] [blame] | 13 | "locate") PORTMAP="8095:8095";; |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 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 | |
Instrumental | 924b18d | 2018-04-05 20:17:18 -0500 | [diff] [blame] | 21 | # if [ "`docker container ls | grep aaf_$AAF_COMPONENT:$VERSION`" == "" ]; then |
| 22 | echo Starting aaf_$AAF_COMPONENT... |
| 23 | docker run \ |
| 24 | -d \ |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 25 | --name aaf_$AAF_COMPONENT \ |
| 26 | --hostname="$HOSTNAME" \ |
| 27 | --add-host="$CASS_HOST" \ |
| 28 | --publish $PORTMAP \ |
Instrumental | 924b18d | 2018-04-05 20:17:18 -0500 | [diff] [blame] | 29 | --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \ |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 30 | --link aaf_cass:cassandra \ |
Instrumental | 924b18d | 2018-04-05 20:17:18 -0500 | [diff] [blame] | 31 | ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 32 | # else |
| 33 | #echo docker container start -ia aaf_$AAF_COMPONENT |
| 34 | # fi |
| 35 | done |
| 36 | # --add-host="$HOSTNAME:$HOST_IP" \ |