When installing Alliance Auth you are instructed to run the
allianceauth start command which generates a folder containing your auth project. This auth project is based off Alliance Auth but can be customized how you wish.
The myauth folder¶
The first folder created is the root directory of your auth project. This folder contains:
manage.pymanagement script used to interact with Django
supervisor.confSupervisor config for running Celery (and optionally Gunicorn) automatically
logfolder which contains log files generated by Alliance Auth
The myauth subfolder¶
Within your auth project root folder is another folder of the same name (a quirk of Django project structures). This folder contains:
a Celery app definition in
celery.pyfor registering tasks with the background workers
a web server gateway interface script
wsgi.pyfor processing web requests
the root URL config
urls.pywhich Django uses to direct requests to the appropriate view
There are also two subfolders for
templates which allow adding new content and overriding default content shipped with Alliance Auth or Django.
And finally the settings folder.
With the settings folder lives two settings files:
The base settings file contains everything needed to run Alliance Auth. It handles configuration of Django and Celery, defines logging, and many other Django-required settings. This file should not be edited. While updating Alliance Auth you may be instructed to update the base settings file - this is achieved through the
allianceauth update command which overwrites the existing base settings file.
The local settings file is referred to as “your auth project’s settings file” and you are instructed to edit it during the install process. You can add any additional settings required by other apps to this file. Upon creation the first line is
from .base import * meaning all settings defined in the base settings file are loaded. You can override any base setting by simply redefining it in your local settings file.
Your auth project comes with four log file definitions by default. These are created in the
myauth/log/ folder at runtime.
INFOlevel and above logging messages from Alliance Auth. This is useful for tracking who is making changes to the site, what is happening to users, and debugging any errors that may occur.
worker.logcontains logging messages from the Celery background task workers. This is useful for monitoring background processes such as group syncing to services.
beat.logcontains logging messages from the background task scheduler. This is of limited use unless the scheduler isn’t starting.
gunicorn.logcontains logging messages from Gunicorn workers. This contains all web-sourced messages found in
allianceauth.logas well as runtime errors from the workers themselves.
When asking for assistance with your auth project be sure to first read the logs, and share any relevant entries.