Skip to content

Mase3206/django-multihost

Repository files navigation

Django MultiHost

Note

GROUPS! See instructions.md for deployment instructions.

This is a set of helpful wrapper scripts and Docker configurations to self-host a multi-site Django server.

We have a wiki now! It goes a bit more in depth than this README does, so take a look at it if you're curious.

Requirements

System

  • Python 3.12+
  • Python Pip
  • jq
  • Git
  • Docker CE
  • pwgen - found in the EPEL repos in RHEL-based distros
  • make

Python

Make sure to install these system-wide!

  • PyYAML

Known Issues

  • Whitenoise version 6.8 or newer defined in the requirements.txt file is required for static files to be served correctly (or at all) - Issue #5

Installing

  1. Clone this repo to /django/source
git clone https://github.com/mase3206/django-multihost.git /django/source
  1. Navigate to /django/source via cd

Warning

Do not run the following commands as root! Doing so will result in broken permissions. Run them as yourself and enter your password when prompted.

  1. Run make groups to set up the necessary groups for your user
    • adds your user to the 'docker' group
    • creates and adds your user to the 'classadmin' group
  2. Run make install to:
    • set permissions
    • create symlinks for 'deploy.py' to deploy and 'create-group.sh' to create-group

Removing

  1. Navigate to /django/source via cd
  2. Run make remove to:
    • remove symlinks
  3. Delete the /django/source folder, if desired.

Licensing

This code is licensed under the GPLv3 license. See LICENSE for more details or TL;DR Legal for a rundown.