-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
90 lines (84 loc) · 2.43 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3.8'
services:
auth_mysql:
image: mysql
container_name: auth_mysql
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --default-authentication-plugin=mysql_native_password]
volumes:
- ./mysql:/var/lib/mysql
- ./mysql-custom:/etc/mysql/conf.d
- ./setup.sql:/docker-entrypoint-initdb.d/setup.sql
environment:
- MYSQL_ROOT_PASSWORD=${AA_DB_ROOT_PASSWORD}
networks:
- aa-network
healthcheck:
test: ["CMD", "mysqladmin", "-uroot", "-p`${AA_DB_ROOT_PASSWORD}`", "-h", "localhost", "ping"]
interval: 5s
timeout: 10s
retries: 3
restart: unless-stopped
nginx:
image: nginx:1.15.5
container_name: aa-nginx
labels:
- "traefik.enable=true"
## HTTP Routers
- "traefik.http.routers.aaauth-rtr.entrypoints=https"
- "traefik.http.routers.aaauth-rtr.rule=Host(`${SUB_DOMAIN}.${DOMAIN}`)"
## Middlewares
- "traefik.http.routers.aaauth-rtr.middlewares=chain-no-auth@file"
## HTTP Services
- "traefik.http.routers.aaauth-rtr.service=aaauth-svc"
- "traefik.http.services.aaauth-svc.loadbalancer.server.port=8080"
volumes:
- ./conf/local.conf:/etc/nginx/conf.d/default.conf
- static-volume:/var/www/myauth/static
depends_on:
- allianceauth
networks:
- aa-network
- t2_proxy
redis:
image: redis:3
container_name: aa-redis
command: redis-server
restart: always
volumes:
- "redis-data:/data"
networks:
- aa-network
expose:
- "6379"
logging:
driver: "json-file"
options:
max-size: "10Mb"
max-file: "5"
allianceauth:
image: milleruk/allianceauth
container_name: aa-auth
restart: always
#command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic && /usr/bin/supervisord"
ports:
- 5555:5555
environment:
DB_HOST: "${AA_DB_HOST}"
DB_NAME: "${AA_DB_NAME}"
DB_USER: "${AA_DB_USER}"
DB_PASSWORD: "${AA_DB_PASSWORD}"
volumes:
- ./conf/local.py:/home/allianceserver/myauth/myauth/settings/local.py
- ./templates:/home/allianceserver/myauth/myauth/templates/
- static-volume:/var/www/myauth/static
depends_on:
- redis
networks:
- aa-network
- t2_proxy
networks:
t2_proxy:
aa-network:
volumes:
redis-data:
static-volume: