diff --git a/docs/features/apps/autogroups.md b/docs/features/apps/autogroups.md index 7bce5ebf..0394c1bc 100644 --- a/docs/features/apps/autogroups.md +++ b/docs/features/apps/autogroups.md @@ -4,9 +4,33 @@ Auto Groups allows you to automatically place users of certain states into corp ## Installation -This is an optional app that needs to be installed. +- Add `'allianceauth.eveonline.autogroups',` to `INSTALLED_APPS` in your `local.py` -To install this app add `'allianceauth.eveonline.autogroups',` to your `INSTALLED_APPS` list and run migrations. All other settings are controlled via the admin panel under the `Eve_Autogroups` section. +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: + +All other settings are controlled via the admin panel under the `Eve_Autogroups` section. ## Configuring a group diff --git a/docs/features/apps/corpstats.md b/docs/features/apps/corpstats.md index c96d4240..bdedaf54 100644 --- a/docs/features/apps/corpstats.md +++ b/docs/features/apps/corpstats.md @@ -8,7 +8,31 @@ This module is used to check the registration status of Corp members and to dete Corp Stats requires access to the `esi-corporations.read_corporation_membership.v1` SSO scope. Update your application on the [EVE Developers site](https://developers.eveonline.com) to ensure it is available. -Add `'allianceauth.corputils',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation. +- Add `'allianceauth.corputils',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Creating a Corp Stats diff --git a/docs/features/apps/fleetactivitytracking.md b/docs/features/apps/fleetactivitytracking.md index d34c3794..ea4bef2c 100644 --- a/docs/features/apps/fleetactivitytracking.md +++ b/docs/features/apps/fleetactivitytracking.md @@ -8,7 +8,31 @@ The Fleet Activity Tracking (FAT) app allows you to track fleet participation. Fleet Activity Tracking requires access to the `esi-location.read_location.v1`, `esi-location.read_ship_type.v1`, and `esi-universe.read_structures.v1` SSO scopes. Update your application on the [EVE Developers site](https://developers.eveonline.com) to ensure these are available. -Add `'allianceauth.fleetactivitytracking',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation. +Add `'allianceauth.fleetactivitytracking',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Permissions diff --git a/docs/features/apps/hrapplications.md b/docs/features/apps/hrapplications.md index 9833591d..4524f9c5 100644 --- a/docs/features/apps/hrapplications.md +++ b/docs/features/apps/hrapplications.md @@ -10,7 +10,31 @@ This app allows you to manage applications for multiple corporations in your all ## Installation -Add `'allianceauth.hrapplications',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation. +- Add `'allianceauth.hrapplications',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Management diff --git a/docs/features/apps/optimer.md b/docs/features/apps/optimer.md index 91bbb3e2..4a6540bb 100644 --- a/docs/features/apps/optimer.md +++ b/docs/features/apps/optimer.md @@ -6,7 +6,31 @@ Fleet Operations is an app for organizing and communicating fleet schedules. ## Installation -Add `'allianceauth.optimer',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation. +- Add `'allianceauth.optimer',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Permissions diff --git a/docs/features/apps/permissions_tool.md b/docs/features/apps/permissions_tool.md index 419971f3..6fae5eff 100644 --- a/docs/features/apps/permissions_tool.md +++ b/docs/features/apps/permissions_tool.md @@ -2,9 +2,33 @@ Access to most of Alliance Auth's features is controlled by Django's permissions system. To help you secure your services, Alliance Auth provides a permission auditing tool. -This is an optional app that needs to be installed. +## Installation -To install it add `'allianceauth.permissions_tool',` to your `INSTALLED_APPS` list in your auth project's settings file. +- Add `'allianceauth.permissions_tool',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Usage diff --git a/docs/features/apps/srp.md b/docs/features/apps/srp.md index 7663bb04..e76ebf97 100644 --- a/docs/features/apps/srp.md +++ b/docs/features/apps/srp.md @@ -6,7 +6,31 @@ Ship Replacement helps you to organize ship replacement programs (SRP) for your ## Installation -Add `'allianceauth.srp',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation. +- Add `'allianceauth.srp',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Permissions diff --git a/docs/features/apps/timerboard.md b/docs/features/apps/timerboard.md index 6a134b2c..a79bb62b 100644 --- a/docs/features/apps/timerboard.md +++ b/docs/features/apps/timerboard.md @@ -6,7 +6,31 @@ Structure Timers helps you keep track of both offensive and defensive structure ## Installation -Add `'allianceauth.timerboard',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation. +- Add `'allianceauth.timerboard',` to `INSTALLED_APPS` in your `local.py` + +Perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: ## Permissions diff --git a/docs/features/services/discord.md b/docs/features/services/discord.md index 106ac480..7f04ed8d 100644 --- a/docs/features/services/discord.md +++ b/docs/features/services/discord.md @@ -6,13 +6,13 @@ Discord is a web-based instant messaging client with voice. Kind of like TeamSpe Discord is very popular amongst ad-hoc small groups and larger organizations seeking a modern technology. Alternative voice communications should be investigated for larger than small-medium groups for more advanced features. -## Setup +## Setup Auth ### Prepare Your Settings File Make the following changes in your auth project's settings file (`local.py`): -- Add `'allianceauth.services.modules.discord',` to `INSTALLED_APPS` +- Add `'allianceauth.services.modules.discord',` to `INSTALLED_APPS` in your `local.py` - Append the following to the bottom of the settings file: ```python @@ -37,6 +37,34 @@ CELERYBEAT_SCHEDULE['discord.update_all_usernames'] = { You will have to add most of the values for these settings, e.g., your Discord server ID (aka guild ID), later in the setup process. ::: +### Preparing Auth + +Before continuing, it is essential to perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: + +## Setup Discord + ### Creating a Server Navigate to the [Discord site](https://discord.com/) and register an account, or log in if you have one already. @@ -67,10 +95,6 @@ Update your auth project's settings file with these pieces of information from t - From the OAuth2 > General panel, `DISCORD_APP_SECRET` is the Client Secret - From the Bot panel, `DISCORD_BOT_TOKEN` is the Token -### Preparing Auth - -Before continuing, it is essential to run migrations and restart Gunicorn and Celery. - ### Adding a Bot to the Server Once created, navigate to the "Services" page of your Alliance Auth install as the superuser account. At the top there is a big green button labeled "Link Discord Server". Click it, then from the drop-down select the server you created, and then Authorize. diff --git a/docs/features/services/discourse.md b/docs/features/services/discourse.md index 0f383d61..7ed2082e 100644 --- a/docs/features/services/discourse.md +++ b/docs/features/services/discourse.md @@ -1,11 +1,13 @@ # Discourse -## Prepare Your Settings +## Setup Auth + +### Prepare Your Settings File In your auth project's settings file, do the following: -- Add `'allianceauth.services.modules.discourse',` to your `INSTALLED_APPS` list -- Append the following to your local.py settings file: +- Add `'allianceauth.services.modules.discourse',` to `INSTALLED_APPS` in your `local.py` +- Append the following to your `local.py` settings file: ```python # Discourse Configuration @@ -15,6 +17,32 @@ DISCOURSE_API_KEY = '' DISCOURSE_SSO_SECRET = '' ``` +### Preparing Auth + +Before continuing, it is essential to perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: + ## Install Docker ```shell diff --git a/docs/features/services/xenforo.md b/docs/features/services/xenforo.md index c83d0475..2d20abb4 100644 --- a/docs/features/services/xenforo.md +++ b/docs/features/services/xenforo.md @@ -4,12 +4,14 @@ [XenForo](https://xenforo.com/) is a popular, paid forum. This guide will assume that you already have XenForo installed with a valid license (please keep in mind that XenForo is not free nor open-source, therefore, you need to purchase a license first). If you come across any problems related with the installation of XenForo please contact their support service. -## Prepare Your Settings +## Setup Auth + +### Prepare Your Settings In your auth project's settings file, do the following: -- Add `'allianceauth.services.modules.xenforo',` to your `INSTALLED_APPS` list -- Append the following to your local.py settings file: +- Add `'allianceauth.services.modules.xenforo',` to `INSTALLED_APPS` in your `local.py` +- Append the following to your `local.py` settings file: ```python # XenForo Configuration @@ -18,6 +20,32 @@ XENFORO_DEFAULT_GROUP = 0 XENFORO_APIKEY = 'yourapikey' ``` +### Preparing Auth + +Before continuing, it is essential to perform Django Maintenance and restart our Web Service and Workers. + +::::{tabs} +:::{group-tab} Bare Metal + +```shell +python manage.py migrate +python manage.py collectstatic --noinput +supervisorctl restart myauth: +``` + +::: +:::{group-tab} Containerized + +```shell +docker compose --env-file=.env up -d +docker compose exec allianceauth_gunicorn bash +auth migrate +auth collectstatic +``` + +::: +:::: + ## XenAPI By default, XenForo does not support any kind of API, however, there is a third-party package called [XenAPI](https://github.com/Contex/XenAPI) which provides a simple REST interface by which we can access XenForo's functions to create and edit users. diff --git a/docs/maintenance/apps.md b/docs/maintenance/apps.md index 762269e4..37695083 100644 --- a/docs/maintenance/apps.md +++ b/docs/maintenance/apps.md @@ -4,10 +4,25 @@ Your auth project is just a regular Django project - you can add in [other Django apps](https://djangopackages.org/) as desired. Most come with dedicated setup guides, but here is the general procedure: -1. add `'appname',` to your `INSTALLED_APPS` setting in `local.py` -2. run `python manage.py migrate` -3. run `python manage.py collectstatic --noinput` -4. restart AA with `supervisorctl restart myauth:` +::::{tabs} +:::{group-tab} Bare Metal + +1. Add `'appname',` to `INSTALLED_APPS` setting in `local.py` +1. Run Migrations `python manage.py migrate` +1. Collect Static Files `python manage.py collectstatic --noinput` +1. Restart our Web Service and Workers `supervisorctl restart myauth:` + +::: +:::{group-tab} Containerized + +1. Add `'appname',` to `INSTALLED_APPS` setting in `local.py` +1. Restart our Web Service and Workers `docker compose --env-file=.env up -d` +1. Enter a Docker Container `docker compose exec allianceauth_gunicorn bash` +1. Run Migrations `auth migrate` +1. Collect Static Files `auth collectstatic` + +::: +:::: ## Removing Apps @@ -25,20 +40,38 @@ First, we want to remove the app related tables from the database. Let's first try the automatic approach by running the following command: +::::{tabs} +:::{group-tab} Bare Metal + ```shell python manage.py migrate appname zero ``` +::: +:::{group-tab} Containerized + +```shell +docker compose exec allianceauth_gunicorn bash +python manage.py migrate appname zero +``` + +::: +:::: + If that works, you'll get a confirmation message. -If that did not work, and you got error messages, you will need to remove the tables manually. This is pretty common btw, because many apps use sophisticated table setups, which cannot be removed automatically by Django. +If that did not work, and you got error messages, you will need to remove the tables manually. +> This is pretty common, because many apps use sophisticated table setups, which cannot be removed automatically by Django. #### Manual table removal +::::{tabs} +:::{group-tab} Bare Metal + First, tell Django that these migrations are no longer in effect (note the additional `--fake`): ```shell -python manage.py migrate appname zero --fake +python manage.py appname zero --fake ``` Then, open the mysql tool and connect to your Alliance Auth database: @@ -75,6 +108,53 @@ SET FOREIGN_KEY_CHECKS=1; exit; ``` +::: +:::{group-tab} Containerized + +First, tell Django that these migrations are no longer in effect (note the additional `--fake`): + +```shell +auth migrate appname zero --fake +``` + +Here we need to swap containers, if you are still inside allianceauth_gunicorn, exit with `exit` + +```shell +docker compose exec auth_mysql bash +sudo mysql -u root +use alliance_auth; +``` + +Next, disable foreign key check. This makes it much easier to drop tables in any order. + +```shell +SET FOREIGN_KEY_CHECKS=0; +``` + +Then get a list of all tables. All tables belonging to the app in question will start with `appname_`. + +```shell +show tables; +``` + +Now, drop the tables from the app one by one like so: + +```shell +drop table appname_model_1; +drop table appname_model_2; +... +``` + +And finally, but very importantly, re-enable foreign key checks again and then exit: + +```shell +SET FOREIGN_KEY_CHECKS=1; +exit; +``` + +::: +:::: + ### Step 2 - Remove the app from Alliance Auth Once the tables have been removed, you can remove the app from Alliance Auth. This is done by removing the applabel from the `INSTALLED_APPS` list in your local settings file.