This is the repository for the humanist project at Kings Digital Lab
This project uses the technologies outlined in our Technology Stack and is configured to use Vagrant for local development and Fabric for deployment.
- Docker
- Docker Compose
If we want Django to communicate with the host machine, e.g. for mails, we need to add the ip address of the local network interface in the docker compose configuration file.
To list the ip addresses of all local network interfaces ip addr show
Limit to a specific interface (in this example eth0) ip addr show eth0
Create a .env
file in the root directory of the project to store environment-specific variables. Use the .env.sample
file as a template. The .env
file should look like this:
BASE_URL=https://miskatonic.hki.uni-koeln.de
MAILHOST_IP=134.95.80.110
LOCAL_MAILDIR=/home/humanist/Maildir
These variables will be used in the docker-compose.yml
file to configure the application.
Some Django settings may have to be overridden. To do this, create a local.py
in ./humanist/settings/
Example configuration
./humanist/settings/local.py
from .base import * # noqa
from .docker import * # noqa
LOGGING_LEVEL = logging.DEBUG
LOGGING['loggers']['humanist']['level'] = LOGGING_LEVEL
DEBUG = True
SECRET_KEY = 'changeme'
Override Django base settings as needed in this file. Try to not override any of the docker related settings.
Simply run docker-compose up
First, find the name of the docker compose container in the docker compose log.
Should be something like humanist-django_web_1
Access the container console using:
docker exec -it humanist-django_web_1 /bin/bash
Inside of the container run the following script:
./manage.py createsuperuser
First, find the name of the docker compose container in the docker compose log.
Should be something like humanist-django_web_1
Access the container console using:
docker exec -it humanist-django_web_1 /bin/bash
Inside of the container run the following script:
./manage.py command
To see a list of all management commands run the following:
./manage.py