Initial setup to have a mailman server running

This includes running containers for mailman-core and mailman-web, both
connecting to the same database used by the boost web site.

The branch proposes a minor refactoring for the shared usage of the
compose-start.sh script, allowing both the boost web server and the mailman-web
server to wait for the db, run migrations, collect assets and run the django
devserver.
This commit is contained in:
Natalia
2023-05-04 22:59:11 -03:00
parent 7aaa36cb95
commit 762975930d
8 changed files with 57 additions and 6 deletions

12
docker/compose-start.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
#
# This script is used to start our Django WSGI process (gunicorn in this case)
# for use with docker-compose. In deployed or production scenarios you would
# not necessarily use this exact setup.
#
$DOCKER_DIR/wait-for-it.sh -h db -p $PGPORT -t 20 -- $PYTHON manage.py migrate --noinput
$PYTHON manage.py collectstatic --noinput
# gunicorn -c gunicorn.conf.py --log-level INFO --reload -b 0.0.0.0:$WEB_PORT config.wsgi
$PYTHON manage.py runserver 0.0.0.0:$WEB_PORT

View File

@@ -146,7 +146,7 @@ WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
WAITFORIT_ISBUSY=1
WAITFORIT_BUSYTIMEFLAG="-t"
WAITFORIT_BUSYTIMEFLAG=""
else
WAITFORIT_ISBUSY=0