-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
49 lines (48 loc) · 1.32 KB
/
docker-compose.dev.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
# demonstrating local deployment with http and local database
services:
moodle:
container_name: moodle
build:
context: ./moodle
environment:
- DB_HOST=database
- DB_PORT=5432
- DB_NAME=moodle
- DB_USER=user
- DB_PASSWORD=password
- WWW_ROOT=http://localhost
volumes:
- moodle_source:/var/www/html/moodle
- ./moodle-data:/home/moodle-data:rw
- ./moodle_docker-fpm.ini:/usr/local/etc/php/conf.d/docker-fpm.ini:ro
- ./moodle_config.php:/var/www/html/moodle/config.php:ro
- ./moodle-plugins/mass_enroll:/var/www/html/moodle/local/mass_enroll:ro
depends_on:
- database
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx/http.conf:/etc/nginx/conf.d/default.conf:ro
- moodle_source:/var/www/html/moodle
- ./moodle-data:/home/moodle-data:rw
ports:
- "80:80"
depends_on:
- moodle
database:
image: postgres:16.4-alpine
container_name: database
volumes:
- database_volume:/var/lib/postgresql/data/
restart: always
shm_size: 128mb # set shared memory limit when using docker-compose
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: moodle
ports:
- "5440:5432"
volumes:
moodle_source:
database_volume: