Skip to content

Commit c6ba1e1

Browse files
committed
upgrade moodle
1 parent 0bea4d4 commit c6ba1e1

4 files changed

Lines changed: 50 additions & 124 deletions

File tree

apps/moodle/.env

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,16 @@
11
W9_POWER_PASSWORD='mCjG5CnUKA!GsOXK'
2-
W9_VERSION='5.0'
2+
W9_VERSION='5.1.1'
33
W9_DIST='community'
4-
W9_REPO=bitnamilegacy/moodle
4+
W9_REPO=websoft9dev/moodle
55

66
#### -- Not allowed to edit below environments when recreate app based on existing data -- ####
77
W9_ID='moodle'
8-
W9_HTTP_PORT=8080
8+
W9_HTTP_PORT=80
99
W9_HTTP_PORT_SET='9001'
1010
W9_URL='appname.example.com'
11-
W9_LOGIN_USER=admin
12-
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
11+
W9_URL_REPLACE=true
1312
W9_DB_EXPOSE="mariadb"
1413
W9_MARIADB_VERSION="11.4"
1514
W9_DIST='community'
1615
W9_NETWORK=websoft9
1716
#### --------------------------------------------------------------------------------------- ####
18-
19-
20-
# below envs is from Bitnami Moodle
21-
22-
MOODLE_EMAIL=user@example.com
23-
PHP_ENABLE_OPCACHE=true
24-
PHP_MAX_EXECUTION_TIME=300
25-
PHP_MAX_INPUT_TIME=800
26-
# if set this param, moodle container always restart
27-
#PHP_MAX_INPUT_VARS=2000
28-
PHP_MEMORY_LIMIT=600M
29-
PHP_POST_MAX_SIZE=900M
30-
PHP_UPLOAD_MAX_FILESIZE=900M

apps/moodle/docker-compose-custom.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

apps/moodle/docker-compose.yml

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# image: https://hub.docker.com/r/bitnami/moodle
2-
# compose: https://github.com/bitnami/containers/blob/main/bitnami/moodle/docker-compose.yml
1+
# Custom Moodle with php:apache base image
2+
# Official installation guide: https://docs.moodle.org/501/en/Installation_quick_guide
33

44
version: "3.8"
55

@@ -9,45 +9,61 @@ services:
99
container_name: ${W9_ID}
1010
restart: unless-stopped
1111
environment:
12-
- ALLOW_EMPTY_PASSWORD=no
13-
- MOODLE_DATABASE_HOST=${W9_ID}-mariadb
14-
- MOODLE_DATABASE_PORT_NUMBER=3306
15-
- MOODLE_DATABASE_USER=moodle
16-
- MOODLE_DATABASE_PASSWORD=${W9_POWER_PASSWORD}
17-
- MOODLE_DATABASE_NAME=moodle
18-
- MOODLE_USERNAME=${W9_LOGIN_USER}
19-
- MOODLE_PASSWORD=${W9_LOGIN_PASSWORD}
12+
# Database configuration
13+
- MOODLE_DB_TYPE=mariadb
14+
- MOODLE_DB_HOST=${W9_ID}-mariadb
15+
- MOODLE_DB_PORT=3306
16+
- MOODLE_DB_NAME=moodle
17+
- MOODLE_DB_USER=moodle
18+
- MOODLE_DB_PASSWORD=${W9_POWER_PASSWORD}
19+
# Site configuration
20+
- MOODLE_URL=http://${W9_URL}
21+
- MOODLE_SITE_NAME=Moodle Learning Platform
22+
- MOODLE_SITE_SHORT=Moodle
23+
# Admin account
24+
- MOODLE_ADMIN_USER=${W9_LOGIN_USER}
25+
- MOODLE_ADMIN_PASSWORD=${W9_LOGIN_PASSWORD}
26+
- MOODLE_ADMIN_EMAIL=${MOODLE_EMAIL}
27+
# Data directory
28+
- MOODLE_DATA=/var/moodledata
2029
ports:
21-
- "${W9_HTTP_PORT_SET}:${W9_HTTP_PORT}"
22-
env_file:
23-
- .env
30+
- "${W9_HTTP_PORT_SET}:80"
2431
volumes:
25-
- "moodle_data:/bitnami/moodle"
26-
- "moodledata_data:/bitnami/moodledata"
32+
- moodle_html:/var/www/html
33+
- moodle_data:/var/moodledata
2734
depends_on:
28-
- mariadb
35+
mariadb:
36+
condition: service_healthy
2937

3038
mariadb:
31-
image: bitnamilegacy/mariadb:$W9_MARIADB_VERSION
39+
image: mariadb:${W9_MARIADB_VERSION}
3240
container_name: ${W9_ID}-mariadb
3341
restart: unless-stopped
3442
environment:
35-
- ALLOW_EMPTY_PASSWORD=no
36-
- MARIADB_USER=moodle
37-
- MARIADB_PASSWORD=${W9_POWER_PASSWORD}
38-
- MARIADB_ROOT_PASSWORD=${W9_POWER_PASSWORD}
39-
- MARIADB_DATABASE=moodle
40-
- MARIADB_CHARACTER_SET=utf8mb4
41-
- MARIADB_COLLATE=utf8mb4_unicode_ci
43+
- MYSQL_ROOT_PASSWORD=${W9_POWER_PASSWORD}
44+
- MYSQL_DATABASE=moodle
45+
- MYSQL_USER=moodle
46+
- MYSQL_PASSWORD=${W9_POWER_PASSWORD}
47+
command: >
48+
--character-set-server=utf8mb4
49+
--collation-server=utf8mb4_unicode_ci
50+
--max_allowed_packet=512M
51+
--innodb_buffer_pool_size=512M
52+
--innodb_log_file_size=256M
4253
volumes:
43-
- "mariadb_data:/bitnami/mariadb"
44-
54+
- mariadb_data:/var/lib/mysql
55+
healthcheck:
56+
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
57+
interval: 10s
58+
timeout: 5s
59+
retries: 5
60+
4561
volumes:
46-
mariadb_data:
62+
moodle_html:
4763
moodle_data:
48-
moodledata_data:
64+
mariadb_data:
4965

5066
networks:
5167
default:
5268
name: ${W9_NETWORK}
53-
external: true
69+
external: true

apps/moodle/variables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"edition": [
88
{
99
"dist": "community",
10-
"version": ["5.0","latest"]
10+
"version": ["5.1.1","latest"]
1111
}
1212
],
1313
"requirements": {

0 commit comments

Comments
 (0)