Compare commits

...

8 Commits

Author SHA1 Message Date
Peter Pfeufer
bbbb5c0d52 Merge branch 'supervisor-env-variables' into 'master'
[ADD] Environment variables to supervisor config

See merge request allianceauth/allianceauth!1739
2025-08-22 17:51:21 +00:00
Ariel Rin
222547187e Merge branch 'master' into 'master'
Added member id on error to make error message more useful

See merge request allianceauth/allianceauth!1754
2025-08-18 06:00:33 +00:00
Rapid Fire
ce872d67bb Added Peter Pfeufer's rewording.
https://gitlab.com/allianceauth/allianceauth/-/merge_requests/1754#note_2691552686
2025-08-18 05:34:29 +00:00
Rapid Fire
fcffb3d2ff Added member id on error to make error message more useful 2025-08-18 01:41:15 +00:00
Ariel Rin
1930dfab77 Merge branch 'patch-1' into 'master'
fix 404

See merge request allianceauth/allianceauth!1753
2025-08-15 06:36:30 +00:00
salartarium
b4418c8c36 fix 404 2025-08-15 06:36:29 +00:00
Joel Falknau
152ebf86f9
Version Bump 4.9.0 2025-08-14 12:32:46 +10:00
Peter Pfeufer
d67ab108a0
[ADD] Environment variables to supervisor config 2025-08-10 12:59:56 +02:00
7 changed files with 48 additions and 25 deletions

View File

@ -89,6 +89,6 @@ Alliance Auth is maintained and developed by the community and we welcome every
To see what needs to be worked on please review our issue list or chat with our active developers on Discord.
Also, please make sure you have signed the [License Agreement](https://developers.eveonline.com/resource/license-agreement) by logging in at [https://developers.eveonline.com](https://developers.eveonline.com) before submitting any pull requests.
Also, please make sure you have signed the [License Agreement](https://developers.eveonline.com/license-agreement) by logging in at [https://developers.eveonline.com](https://developers.eveonline.com) before submitting any pull requests.
In addition to the core AA system we also very much welcome contributions to our growing list of 3rd party services and plugin apps. Please see [AA Community Creations](https://gitlab.com/allianceauth/community-creations) for details.

View File

@ -5,7 +5,7 @@ manage online service access.
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
__version__ = '4.8.0'
__version__ = '4.9.0'
__title__ = 'Alliance Auth'
__title_useragent__ = 'AllianceAuth'
__url__ = 'https://gitlab.com/allianceauth/allianceauth'

View File

@ -13,6 +13,7 @@ class StartProject(BaseStartProject):
parser.add_argument('--celery', help='The path to the celery executable.')
parser.add_argument('--gunicorn', help='The path to the gunicorn executable.')
parser.add_argument('--memmon', help='The path to the memmon executable.')
parser.add_argument('--venv_directory', help='The path to the virtual environment directory.')
def create_project(parser, options, args):
@ -27,7 +28,7 @@ def create_project(parser, options, args):
allianceauth_path = os.path.dirname(allianceauth.__file__)
template_path = os.path.join(allianceauth_path, 'project_template')
# Determine locations of commands to render supervisor cond
# Determine locations of commands to render supervisor configuration
command_options = {
'template': template_path,
'python': shutil.which('python'),
@ -35,6 +36,7 @@ def create_project(parser, options, args):
'celery': shutil.which('celery'),
'memmon': shutil.which('memmon'),
'extensions': ['py', 'conf', 'json'],
'venv_directory': os.getenv('VIRTUAL_ENV'),
}
# Strip 'start' out of the arguments, leaving project name (and optionally destination dir)

View File

@ -1,22 +1,37 @@
[supervisord]
environment =
AA_USER = allianceserver, ; The user under which the processes will run
AA_PROJECT_NAME = {{ project_name }}, ; The name of the project
AA_PROJECT_DIRECTORY = {{ project_directory }}, ; The directory of the project
AA_VENV_DIRECTORY = {{ venv_directory }}, ; The directory of the virtual environment
AA_COMMAND_CELERY = {{ celery }}, ; The command to run Celery
AA_COMMAND_GUNICORN = {{ gunicorn }}, ; The command to run Gunicorn
AA_COMMAND_MEMMON = {{ memmon }} ; The command to run Memmon
[program:beat]
command = {{ celery }} -A {{ project_name }} beat
directory = {{ project_directory }}
user = allianceserver
stdout_logfile = {{ project_directory }}/log/%(program_name)s.log
stderr_logfile = {{ project_directory }}/log/%(program_name)s.log
command = %(ENV_AA_COMMAND_CELERY)s
-A %(ENV_AA_PROJECT_NAME)s beat
directory = %(ENV_AA_VENV_DIRECTORY)s
user = %(ENV_AA_USER)s
stdout_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/%(program_name)s.log
stderr_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/%(program_name)s.log
autostart = true
autorestart = true
startsecs = 10
priority = 998
[program:worker]
command = {{ celery }} -A {{ project_name }} worker --pool=threads --concurrency=5 -n %(program_name)s_%(process_num)02d
directory = {{ project_directory }}
user = allianceserver
command = %(ENV_AA_COMMAND_CELERY)s
-A %(ENV_AA_PROJECT_NAME)s worker
--pool=threads
--concurrency=5
-n %(program_name)s_%(process_num)02d
directory = %(ENV_AA_VENV_DIRECTORY)s
user = %(ENV_AA_USER)s
numprocs = 1
process_name = %(program_name)s_%(process_num)02d
stdout_logfile = {{ project_directory }}/log/%(program_name)s.log
stderr_logfile = {{ project_directory }}/log/%(program_name)s.log
stdout_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/%(program_name)s.log
stderr_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/%(program_name)s.log
autostart = true
autorestart = true
startsecs = 10
@ -26,22 +41,26 @@ priority = 998
{% if gunicorn %}
[program:gunicorn]
user = allianceserver
directory = {{ project_directory }}
command = {{ gunicorn }} {{ project_name }}.wsgi --workers=3 --timeout 120
stdout_logfile = {{ project_directory }}/log/%(program_name)s.log
stderr_logfile = {{ project_directory }}/log/%(program_name)s.log
user = %(ENV_AA_USER)s
directory = %(ENV_AA_VENV_DIRECTORY)s
command = %(ENV_AA_COMMAND_GUNICORN)s %(ENV_AA_PROJECT_NAME)s.wsgi
--workers=3
--timeout 120
stdout_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/%(program_name)s.log
stderr_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/%(program_name)s.log
autostart = true
autorestart = true
stopsignal = INT
{% endif %}
[eventlistener:memmon]
command = {{ memmon }} -p worker_00=256MB -p gunicorn=256MB
directory = {{ project_directory }}
command = %(ENV_AA_COMMAND_MEMMON)s
-p worker_00=256MB
-p gunicorn=256MB
directory = %(ENV_AA_VENV_DIRECTORY)s
events = TICK_60
stdout_logfile = {{ project_directory }}/log/memmon.log
stderr_logfile = {{ project_directory }}/log/memmon.log
stdout_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/memmon.log
stderr_logfile = %(ENV_AA_VENV_DIRECTORY)s/log/memmon.log
[group:{{ project_name }}]
programs = beat,worker{% if gunicorn %},gunicorn{% endif %}

View File

@ -675,10 +675,12 @@ class DiscordClient:
)
logger.debug('%s: response:\n%s', uid, r.text)
if not r.ok:
member_id = url.split("/")[-1]
logger.error(
'%s: Discord API returned error code %d and this response: %s',
'%s: Discord API returned error code %d for member ID %s with this response: %s.',
uid,
r.status_code,
member_id,
r.text
)

View File

@ -1,7 +1,7 @@
PROTOCOL=https://
AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN%
DOMAIN=%DOMAIN%
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.8.0
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.9.0
# Nginx Proxy Manager
PROXY_HTTP_PORT=80

View File

@ -1,5 +1,5 @@
FROM python:3.11-slim
ARG AUTH_VERSION=v4.8.0
ARG AUTH_VERSION=v4.9.0
ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION}
ENV AUTH_USER=allianceauth
ENV AUTH_GROUP=allianceauth