Checking for the wrong database URL caused the mailman core to always use an
sqlite database even when another database is defined. This commit fixes that.
`mailman start` command does not nothing but parses the configuration and starts
the appropriate runners. The start command is implemented such that it forks the
master runner, which in-turn starts the all the rest of the runners. It turns
out that `master` is also exported as an console script which can directly be
started instead of running `mailman start` command. This makes containerizing
mailman much more easier.
django.
- -z Does not check properly if the DATABASE_URL is defined or not. It evaluates
to True if it is not set or set to ''
- Remove SECURE_SSL_REDIRECT in the django settings because this deployment is
meant to behind Nginx which decrypts SSL packets.
- Force mailman to start even with a lock. This _may_ not be the best idea but
for now if everything is followed according to this guide.
Following 12factor principle for app development, all the configuration
variables for the docker images can now be setup using environment vars.
The default values are set using the run.sh script in both mailman-web
and mailman-core containers.
Mailman-core is now run by "run.sh" which traps SIGTERM and performs
mailman stop for graceful exit of mailman core.
- Download source code as zip from gitlab instead of git+https because speed.
- Check if the $DATABASE_URL is not defined, use a default sqlite database.
- Use dj-database-url package to set database in django settings using
DATABASE_URL environment variable.
- Use UWSGI_LOG_URL as the URL for UWSGI logging and set it to a default value
if it has not been defined.
- If the logs file doesn't exist, create it so that django doesn't complain about
non-existent log files.
- If the settings_local.py exist, copy it too along with settings.py
- Add configuration for exim to work with mailman core.
- Add configuration to enable hyperkitty in mailman core.
- Add configuration to enable mailman_hyperkitty plugin.
- Add mailman_hyperkitty plugin and ipython in the core container.
- Add hostnames to the container.
- Add a custom bridge network so that the containers and the host can have
a static IP and that can be added in the configurations.
- Assign static IPs to all the containers in the new default configuration.
- Set environemnt variables for Postgresql database in the compose file
- Set environment variables for uwsgi in the compose file
- Check if the postgresql container is up and accepting connections before
running any actual services.
This commit adds a lot of new code including the mailman's web
frontend. It includes a configuration file which can later be
configured to run required configs.
Also, the docker-compose file spins off the containers, sets up
appropriate volumes and links.