# Get environment from common/env-config.sh
. $RUNDIR/../common/env-config.sh

if [ ! -f "${DOCKERKEYS}/openldap/ldap.key" ] || [ ! -f "${DOCKERKEYS}/openldap/ldap.crt" ] || [ ! -f "${DOCKERKEYS}/openldap/ca.crt" ] || [ ! -f "${DOCKERKEYS}/openldap/dhparam.pem" ] || [ ! -f "${DOCKERKEYS}/postgresql/server.pem" ]
then
  echo "Key files not found.  Restore or create keys before running this script."
  exit 1
fi

docker network create isva

docker volume create isvaconfig
docker volume create libldap
docker volume create libsecauthority
docker volume create ldapslapd