forked from erseco/alpine-moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.replica.yml
82 lines (77 loc) · 2.13 KB
/
docker-compose.replica.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
version: '2'
services:
postgres:
image: postgres:alpine
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=moodle
- POSTGRES_USER=moodle
- POSTGRES_DB=moodle
volumes:
- postgres:/var/lib/postgresql/data
redis:
image: redis/redis-stack-server
restart: unless-stopped
volumes:
- redis:/data
moodle:
image: jimsihk/alpine-moodle
restart: unless-stopped
deploy:
replicas: 2
environment:
- LANG=en_US.UTF-8
- LANGUAGE=en_US:en
- SITE_URL=https://localhost
- DB_TYPE=pgsql
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=moodle
- DB_USER=moodle
- DB_PASS=moodle
- DB_PREFIX=mdl_
- SSLPROXY=true
- MOODLE_LANGUAGE=en
- MOODLE_SITENAME=New-Site
- MOODLE_USERNAME=moodleuser
- MOODLE_PASSWORD=PLEASE_CHANGEME
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_PASSWORD=your_password
- SMTP_PROTOCOL=tls
- MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost
- MOODLE_MAIL_PREFIX=[moodle]
- AUTO_UPDATE_MOODLE=true
# not suggest to enable auto update Moodle core code as it may
# cause discrepancy between code and database, alternatively
# may start with 1 replica and then scale up after successfully
# deploy and update
- UPDATE_MOODLE_CODE=false
# uncomment below to define the session cache upon installation
# note: config.php will need to be changed when reverting this config
# - SESSION_CACHE_TYPE=redis
# - SESSION_CACHE_HOST=redis
# - SESSION_CACHE_PORT=6379
# - SESSION_CACHE_PREFIX=mdl
volumes:
- moodledata:/var/www/moodledata
depends_on:
- postgres
- redis
loadbalancer:
image: nginx
volumes:
- ./nginx-lb.conf:/etc/nginx/nginx.conf:ro
- ./https.crt:/etc/nginx/ssl/default.crt:ro
- ./https.key:/etc/nginx/ssl/default.key:ro
ports:
- "80:80"
- "443:443"
depends_on:
- moodle
volumes:
postgres: null
moodledata: null
redis: null