mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-18 14:55:09 +01:00
V4.x Docker Refactoring and Docs
This commit is contained in:
@@ -1,8 +1,45 @@
|
||||
version: '3.8'
|
||||
|
||||
x-allianceauth-base: &allianceauth-base
|
||||
image: ${AA_DOCKER_TAG?err}
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: custom.dockerfile
|
||||
# args:
|
||||
# AA_DOCKER_TAG: ${AA_DOCKER_TAG?err}
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./conf/local.py:/home/allianceauth/myauth/myauth/settings/local.py
|
||||
- ./conf/celery.py:/home/allianceauth/myauth/myauth/celery.py
|
||||
- ./conf/urls.py:/home/allianceauth/myauth/myauth/urls.py
|
||||
- ./conf/memory_check.sh:/memory_check.sh
|
||||
- ./templates:/home/allianceauth/myauth/myauth/templates/
|
||||
- static-volume:/var/www/myauth/static
|
||||
depends_on:
|
||||
- redis
|
||||
- auth_mysql
|
||||
working_dir: /home/allianceauth/myauth/
|
||||
stop_grace_period: 10m
|
||||
|
||||
x-allianceauth-health-check: &allianceauth-health-checks
|
||||
healthcheck:
|
||||
test: [
|
||||
"CMD",
|
||||
"/memory_check.sh",
|
||||
"500000000"
|
||||
]
|
||||
interval: 60s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 5m
|
||||
labels:
|
||||
- "autoheal=true"
|
||||
|
||||
services:
|
||||
auth_mysql:
|
||||
image: mysql:8.0
|
||||
image: mariadb:10.11
|
||||
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --default-authentication-plugin=mysql_native_password]
|
||||
volumes:
|
||||
- ./mysql-data:/var/lib/mysql
|
||||
@@ -23,7 +60,7 @@ services:
|
||||
- ./conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- static-volume:/var/www/myauth/static
|
||||
depends_on:
|
||||
- allianceauth
|
||||
- allianceauth_gunicorn
|
||||
|
||||
redis:
|
||||
image: redis:7.0
|
||||
@@ -32,24 +69,45 @@ services:
|
||||
volumes:
|
||||
- "redis-data:/data"
|
||||
|
||||
allianceauth:
|
||||
image: ${AA_DOCKER_TAG?err}
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: custom.dockerfile
|
||||
# args:
|
||||
# AA_DOCKER_TAG: ${AA_DOCKER_TAG?err}
|
||||
restart: always
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./conf/local.py:/home/allianceauth/myauth/myauth/settings/local.py
|
||||
- ./templates:/home/allianceauth/myauth/myauth/templates/
|
||||
- ./conf/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
||||
- static-volume:/var/www/myauth/static
|
||||
depends_on:
|
||||
- redis
|
||||
- auth_mysql
|
||||
allianceauth_gunicorn:
|
||||
ports:
|
||||
- 8000:8000
|
||||
container_name: allianceauth_gunicorn
|
||||
<<: [*allianceauth-base]
|
||||
entrypoint: [
|
||||
"/opt/venv/bin/gunicorn",
|
||||
"myauth.wsgi",
|
||||
"--bind=0.0.0.0:8000",
|
||||
"--workers=3",
|
||||
"--timeout=120",
|
||||
"--max-requests=500",
|
||||
"--max-requests-jitter=50"
|
||||
]
|
||||
|
||||
allianceauth_beat:
|
||||
container_name: auth_worker_beat
|
||||
<<: [*allianceauth-base]
|
||||
entrypoint: [
|
||||
"/opt/venv/bin/celery",
|
||||
"-A",
|
||||
"myauth",
|
||||
"beat"
|
||||
]
|
||||
|
||||
allianceauth_worker:
|
||||
<<: [*allianceauth-base, *allianceauth-health-checks]
|
||||
entrypoint: [
|
||||
"/opt/venv/bin/celery",
|
||||
"-A",
|
||||
"myauth",
|
||||
"worker",
|
||||
"--pool=threads",
|
||||
"--concurrency=5",
|
||||
"-n",
|
||||
"worker_%n"
|
||||
]
|
||||
deploy:
|
||||
replicas: 2
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana-oss:9.5.2
|
||||
@@ -58,6 +116,7 @@ services:
|
||||
- auth_mysql
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
|
||||
proxy:
|
||||
image: 'jc21/nginx-proxy-manager:latest'
|
||||
restart: always
|
||||
@@ -74,6 +133,7 @@ services:
|
||||
volumes:
|
||||
- proxy-data:/data
|
||||
- proxy-le:/etc/letsencrypt
|
||||
|
||||
proxy-db:
|
||||
image: 'jc21/mariadb-aria:latest'
|
||||
restart: always
|
||||
|
||||
Reference in New Issue
Block a user