Skip to content

Commit

Permalink
Tweaked docker/run slightly. Added 2 utility scripts docker/mailserve…
Browse files Browse the repository at this point in the history
…r 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
  • Loading branch information
levkowetz committed Mar 26, 2017
1 parent ce3b904 commit 00d5ff8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
15 changes: 15 additions & 0 deletions docker/devserver
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 0 deletions docker/mailserver
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docker/run
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docker/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"

AGENDA_PATH = 'test/data/proceedings/'

USING_DEBUG_EMAIL_SERVER=True
EMAIL_HOST='localhost'
EMAIL_PORT=2025

0 comments on commit 00d5ff8

Please sign in to comment.