Updated docker/settings_local.py with new needed settings. Added a lot of quotes to docker/run in order to work better with paths containsing spaces. Touched a file during setup to be more debian compatible.
- Legacy-Id: 13703
This commit is contained in:
parent
70de94fc48
commit
a8db9e74c7
|
@ -65,6 +65,7 @@ RUN apt-get install -qy \
|
|||
locales \
|
||||
man \
|
||||
openssh-client \
|
||||
patch \
|
||||
procps \
|
||||
pv \
|
||||
python \
|
||||
|
@ -106,6 +107,9 @@ RUN rm /etc/apt/sources.list.d/mysql-apt-config.list
|
|||
# Update the package defs, and install the desired mysql from the mysql repo
|
||||
RUN apt-get update
|
||||
RUN apt-get install -qy mysql-community-server libmysqlclient-dev
|
||||
|
||||
# This is expected to exist by the mysql startup scripts:
|
||||
RUN touch /etc/mysql/debian.cnf
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Get rid of installation files we don't need in the image, to reduce size
|
||||
|
|
|
@ -100,7 +100,7 @@ if [ ! -f $VIRTDIR/lib/site-python/settings_local.py ]; then
|
|||
cp /usr/local/share/datatracker/settings_local.py $VIRTDIR/lib/site-python/
|
||||
fi
|
||||
|
||||
for sub in test/id/ test/staging/ test/archive/; do
|
||||
for sub in test/id/ test/staging/ test/archive/ test/rfc test/media; do
|
||||
dir="/home/$USER/$CWD/$sub"
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "Creating dir $dir"
|
||||
|
|
34
docker/run
34
docker/run
|
@ -184,9 +184,9 @@ image=$(docker ps | grep "$REPO:$TAG" | awk '{ print $1 }')
|
|||
if [ "$image" ]; then
|
||||
if [ "$*" ]; then
|
||||
echo "Running 'cd ~/${parent#$HOME/}; $*'"
|
||||
docker exec -u $WHO -t $image bash -c "cd ~/${parent#$HOME/}; $*"
|
||||
docker exec -u "$WHO" -t $image bash -c "cd '~/${parent#$HOME/}'; $*"
|
||||
else
|
||||
docker exec -u $WHO -ti $image bash
|
||||
docker exec -u "$WHO" -ti $image bash
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
|
@ -194,35 +194,35 @@ else
|
|||
|
||||
if [ -n "$DOWNLOAD" ]; then
|
||||
(
|
||||
cd $(dirname $MYSQLDIR)
|
||||
wget -N $DBURL && tar xjf ietf_utf8.bin.tar.bz2 && chmod -R go+rwX mysql
|
||||
cd "$(dirname $MYSQLDIR)"
|
||||
wget -N "$DBURL" && tar xjf ietf_utf8.bin.tar.bz2 && chmod -R go+rwX mysql
|
||||
)
|
||||
[ -d "$MYSQLDIR" ] || die "The download seems to have failed; still no $MYSQLDIR. Giving up."
|
||||
else
|
||||
[ -d "$MYSQLDIR" ] || die "Expected $MYSQLDIR to exist, but it\ndidn't. Use '$program -d' to download and unpack the database."
|
||||
fi
|
||||
|
||||
if ! docker images $REPO | grep -q $TAG; then
|
||||
if ! docker images "$REPO" | grep -q "$TAG"; then
|
||||
echo "Fetching docker image '$REPO:$TAG'"
|
||||
if ! docker pull $REPO:$TAG; then
|
||||
docker pull $REPO:latest || die "Failed to pull down the '$REPO:latest' docker image"
|
||||
id=$(docker images $REPO | grep latest | awk '{print $3}')
|
||||
if ! docker pull "$REPO:$TAG"; then
|
||||
docker pull "$REPO:latest" || die "Failed to pull down the '$REPO:latest' docker image"
|
||||
id=$(docker images "$REPO" | grep latest | awk '{print $3}')
|
||||
echo "Tagging $REPO:latest as $REPO:$TAG for use as environment for this branch."
|
||||
docker tag $id $REPO:$TAG
|
||||
docker tag $id "$REPO:$TAG"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "\nThe web interface for 'runserver' should appear on $URL\n"
|
||||
if [ -z "$MYSQLDIR" ]; then
|
||||
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 -e FILEDIR=${FILEDIR#$HOME} \
|
||||
$REPO:$TAG "$@"
|
||||
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" -e FILEDIR=${FILEDIR#$HOME} \
|
||||
"$REPO:$TAG" "$@"
|
||||
else
|
||||
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 -e FILEDIR=${FILEDIR#$HOME} \
|
||||
$REPO:$TAG "$@"
|
||||
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" -e FILEDIR=${FILEDIR#$HOME} \
|
||||
"$REPO:$TAG" "$@"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
|
|
@ -19,6 +19,8 @@ IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
|
|||
IDSUBMIT_REPOSITORY_PATH = "test/id/"
|
||||
IDSUBMIT_STAGING_PATH = "test/staging/"
|
||||
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"
|
||||
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "test/archive/"
|
||||
RFC_PATH = "test/rfc/"
|
||||
|
||||
AGENDA_PATH = 'test/data/proceedings/'
|
||||
|
||||
|
@ -28,3 +30,16 @@ EMAIL_PORT=2025
|
|||
|
||||
TRAC_WIKI_DIR_PATTERN = "test/wiki/%s"
|
||||
TRAC_SVN_DIR_PATTERN = "test/svn/%s"
|
||||
|
||||
MEDIA_BASE_DIR = 'test'
|
||||
MEDIA_ROOT = MEDIA_BASE_DIR + '/media/'
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
PHOTOS_DIRNAME = 'photo'
|
||||
PHOTOS_DIR = MEDIA_ROOT + PHOTOS_DIRNAME
|
||||
|
||||
SUBMIT_YANG_RFC_MODEL_DIR = '/www/tools.ietf.org/yang/rfcmod/'
|
||||
SUBMIT_YANG_DRAFT_MODEL_DIR = '/www/tools.ietf.org/yang/draftmod/'
|
||||
SUBMIT_YANG_INVAL_MODEL_DIR = '/www/tools.ietf.org/yang/invalmod/'
|
||||
SUBMIT_YANGLINT_COMMAND = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue