Tweaked docker/run slightly. Added 2 utility scripts docker/mailserver and docker/devserver, to start a debug smtp server and a development webserver in separate terminal windws. These assume that the docker image already is running. Tweaked the settings_local in docker/ to send email to the debug smtp server.

- Legacy-Id: 13139
This commit is contained in:
Henrik Levkowetz 2017-03-26 19:28:38 +00:00
parent ce3b904b07
commit 00d5ff8bfe
4 changed files with 33 additions and 1 deletions

15
docker/devserver Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
version=0.10
program=${0##*/}
progdir=${0%/*}
if [ "$progdir" = "$program" ]; then progdir="."; fi
if [ "$progdir" = "." ]; then progdir="$PWD"; fi
parent=$(dirname $progdir)
if [ "$parent" = "." ]; then parent="$PWD"; fi
# ----------------------------------------------------------------------
$progdir/run ietf/manage.py runserver 0.0.0.0:8000

13
docker/mailserver Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
version=0.10
program=${0##*/}
progdir=${0%/*}
if [ "$progdir" = "$program" ]; then progdir="."; fi
if [ "$progdir" = "." ]; then progdir="$PWD"; fi
parent=$(dirname $progdir)
if [ "$parent" = "." ]; then parent="$PWD"; fi
# ----------------------------------------------------------------------
$progdir/run python -m smtpd -n -c DebuggingServer localhost:2025

View file

@ -184,7 +184,7 @@ image=$(docker ps | grep "$REPO:$TAG" | awk '{ print $1 }')
if [ "$image" ]; then
if [ "$*" ]; then
echo "Running 'cd ~/${parent#$HOME/}; $*'"
docker exec -u $WHO $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
fi

View file

@ -21,3 +21,7 @@ IDSUBMIT_STAGING_PATH = "test/staging/"
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"
AGENDA_PATH = 'test/data/proceedings/'
USING_DEBUG_EMAIL_SERVER=True
EMAIL_HOST='localhost'
EMAIL_PORT=2025