Skip to content

Repository for the Humanist mailing list project at King's Digital Lab

License

Notifications You must be signed in to change notification settings

DH-Cologne/humanist-django

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

humanist-django

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.

Requirements

  • Docker
  • Docker Compose

Getting Started

Config

Docker network config

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

Environment variables

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.

Django config

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.

Run docker compose

Simply run docker-compose up

Create an admin account

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

Run management commands

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

About

Repository for the Humanist mailing list project at King's Digital Lab

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.2%
  • HTML 39.4%
  • SCSS 4.5%
  • Shell 2.1%
  • CSS 1.7%
  • Dockerfile 0.1%