-
Notifications
You must be signed in to change notification settings - Fork 54
/
docker-compose.yaml
45 lines (44 loc) · 1.34 KB
/
docker-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
services:
eclass:
image: ghcr.io/gunet/openeclass
depends_on:
db:
condition: service_healthy
ports:
- "80:80"
volumes:
- config_data:/var/www/html/config
- courses_data:/var/www/html/courses
- video_data:/var/www/html/video
environment:
- MYSQL_LOCATION=db
- MYSQL_ROOT_USER=root
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DB=eclass
- ADMIN_USERNAME=admin
# Can be used to set the admin password
# - ADMIN_PASSWORD=secret
- PHP_MAX_UPLOAD=256M
db: # The location of the database
image: mariadb:10.11
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=eclass
command:
- --innodb-buffer-pool-size=120M
- --innodb_flush_log_at_trx_commit=2
- --wait-timeout=86400
- --max_allowed_packet=67108864
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: mysql --user=root --password=$$MYSQL_ROOT_PASSWORD -e 'show databases;' | grep -q $$MYSQL_DATABASE || exit 1
interval: 10s
timeout: 3s
retries: 10
start_period: 5s
volumes:
config_data:
courses_data:
video_data:
db_data: