@@ -79,9 +79,9 @@ longopts=download-data,help,ietfdb-url=,mysqldata=,no-mysqldir,port=,docker-repo
7979
8080# Default values
8181MYSQLDIR=$parent /data/mysql
82- NOMYMAP= " "
82+ FILEDIR= $parent /../data/
8383PORT=8000
84- REPO=" levkowetz /datatracker"
84+ REPO=" ietf /datatracker-environment "
8585TAG=$( basename $( svn info $parent | grep ^URL | awk ' {print $2}' ) )
8686URL=https://www.ietf.org/lib/dt/sprint/ietf_utf8.bin.tar.bz2
8787WHO=$( whoami)
@@ -103,9 +103,9 @@ while true ; do
103103 case " $1 " in
104104 -d| --download-data) DOWNLOAD=1;; # Download and set up the database files
105105 -h| --help) usage; exit ;; # Show this help, then exit
106+ -f| --filedir) FILEDIR=$2 ; shift ;; # Set the desired location of drafts, charters etc.
106107 -i| --ietfdb-url) URL=$2 ; shift ;; # Use an alternative database tarball URL
107- -m| --mysqldir) MYSQLDIR=$2 ; shift ;; # Set the desired location for MySQL's database files
108- -M| --no-mysqldir) NOMYMAP=1;; # Don't map the mysql dir to an external dir
108+ -m| --mysqldir) MYSQLDIR=$2 ; shift ;; # Set the desired location of MySQL's database files
109109 -p| --port) PORT=$2 ; shift ;; # Bind the container's port 8000 to external port PORT
110110 -r| --docker-repo) REPO=$2 ; shift ;; # Use the given docker repository, instead of the default
111111 -t| --tag) TAG=$2 ; shift ;; # Use this docker image tag, instead of the svn branch name
@@ -179,10 +179,16 @@ if ! docker images $REPO | grep -q $TAG; then
179179 fi
180180fi
181181
182- if [ -n " $NOMYMAP " ]; then
183- docker run -ti -p $PORT :8000 -v $HOME :/home/$WHO -e USER=$WHO -e DATADIR=${parent# $HOME / } /data -e CWD=${PWD# $HOME / } -e TAG=$TAG $REPO :$TAG
182+ if [ -z " $MYSQLDIR " ]; then
183+ docker run -ti -p $PORT :8000 -v $HOME :/home/$WHO \
184+ -e USER=$WHO -e DATADIR=${parent# $HOME / } /data -e CWD=${PWD# $HOME / } \
185+ -e TAG=$TAG -e FILEDIR=${FILEDIR# $HOME } \
186+ $REPO :$TAG
184187else
185- docker run -ti -p $PORT :8000 -v $HOME :/home/$WHO -v $MYSQLDIR :/var/lib/mysql -e USER=$WHO -e DATADIR=${parent# $HOME / } /data -e CWD=${PWD# $HOME / } -e TAG=$TAG $REPO :$TAG
188+ docker run -ti -p $PORT :8000 -v $HOME :/home/$WHO -v $MYSQLDIR :/var/lib/mysql\
189+ -e USER=$WHO -e DATADIR=${parent# $HOME / } /data -e CWD=${PWD# $HOME / } \
190+ -e TAG=$TAG -e FILEDIR=${FILEDIR# $HOME } \
191+ $REPO :$TAG
186192fi
187193
188194echo " "
0 commit comments