-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
80 lines (76 loc) · 1.64 KB
/
compose.yaml
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
networks:
default: {}
volumes:
mysql-data: {}
redis-data: {}
moodle-data: {}
services:
web:
image: moodle:dev
build:
context: .
environment:
DB_HOST: 'mysql'
DB_PORT: '3306'
DB_NAME: 'moodle'
DB_USERNAME: 'moodle'
DB_PASSWORD: 'moodle'
MOODLE_HOST: 'http://localhost:8080'
REDIS_HOST: 'redis'
networks: [default]
ports:
- 8080:80
volumes:
- type: volume
source: moodle-data
target: /var/www/moodledata
- ./config.local/config.php:/var/www/moodle/config.php
- ./theme/albe/:/var/www/moodle/theme/albe/
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: moodle
MYSQL_USER: moodle
MYSQL_PASSWORD: moodle
networks: [default]
ports:
- 3388:3306
volumes:
- type: volume
source: mysql-data
target: /var/lib/mysql
volume:
nocopy: true
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-proot"]
interval: 15s
timeout: 5s
retries: 3
start_period: 3s
start_interval: 2s
redis:
image: redis
networks: [default]
volumes:
- type: volume
source: redis-data
target: /data
volume:
nocopy: true
command:
- 'redis-server'
- '--save'
- '' # Disable persistence
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 15s
timeout: 5s
retries: 3
start_period: 3s
start_interval: 2s