6 --mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \
7 --add-host="$HOSTNAME:$HOST_IP" \
8 --add-host="aaf.osaaf.org:$HOST_IP" \
9 --env AAF_ENV=${AAF_ENV} \
10 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
11 --env LATITUDE=${LATITUDE} \
12 --env LONGITUDE=${LONGITUDE} \
13 --name aaf_config_$USER \
14 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
18 function encrypt_it() {
19 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
24 for PROP in AAF_INITIAL_X509_P12 AAF_INITIAL_X509_PASSWORD AAF_SIGNER_P12 AAF_SIGNER_PASSWORD; do
25 if [ "${!PROP}" != "" ]; then
31 # First Time Run does a bit more setup
32 if [ "$(docker volume ls | grep aaf_config)" = "" ] && [ ${P12_LOAD} = "yes" ]; then
33 echo "Initializing first aaf_config"
34 if [ "$(docker container ls | grep aaf_config_$USER)" = "" ]; then
38 echo "aaf_config_$USER is already running"
40 docker container cp ${AAF_INITIAL_X509_P12} aaf_config_$USER:/opt/app/osaaf/local/org.osaaf.aaf.p12
41 docker container cp ${AAF_SIGNER_P12} aaf_config_$USER:/opt/app/osaaf/local/org.osaaf.aaf.signer.p12
43 encrypt_it cadi_keystore_password "${AAF_INITIAL_X509_PASSWORD}"
44 encrypt_it cm_ca.local "${AAF_SIGNER_PASSWORD}"
47 docker container stop aaf_config_$USER
49 docker container rm aaf_config_$USER
53 if [ "$PARAMS" != "" ]; then