This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
79 lines (75 loc) · 2.28 KB
/
docker-compose.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
---
version: '3.6'
services:
nginx-php-moodle:
networks:
all:
image: ${DOCKER_REGISTRY_URL}/nginx-php-moodle:${PHP_VERSION}-${MOODLE_VERSION}
depends_on:
- postgres
environment:
HTTP_PORT: "${HTTP_PORT}"
HTTPS_PORT: "${HTTPS_PORT}"
MOODLE_ADMIN_EMAIL: "${MOODLE_ADMIN_EMAIL}"
MOODLE_ADMIN_PASS: "${MOODLE_ADMIN_PASS}"
MOODLE_DATAROOT: "${MOODLE_DATAROOT}"
MOODLE_DBTYPE: "${MOODLE_DBTYPE}"
MOODLE_VERSION: "${MOODLE_VERSION}"
MOODLE_WWWROOT: "${MOODLE_WWWROOT}"
MOODLE_FULL_NAME: "${MOODLE_FULL_NAME}"
MOODLE_SHORT_NAME: "${MOODLE_SHORT_NAME}"
MOODLE_UPGRADE_KEY: "${MOODLE_UPGRADE_KEY}"
PGSQL_HOSTNAME: "${PGSQL_HOSTNAME}"
PGSQL_PORT: "${PGSQL_PORT}"
PGSQL_DATABASE: "${PGSQL_DATABASE}"
PGSQL_USER: "${PGSQL_USER}"
PGSQL_PASSWORD: "${PGSQL_PASSWORD}"
PHP_VERSION: "${PHP_VERSION}"
ports:
- "${HTTP_PORT}:${HTTP_PORT}"
- "${HTTPS_PORT}:${HTTPS_PORT}"
volumes:
# Nginx configuration
- type: bind
source: ./conf/etc/nginx/nginx.conf
target: /etc/nginx/nginx.conf
- type: bind
source: ./conf/etc/nginx/conf.d
target: /etc/nginx/conf.d
- type: bind
source: ./conf/etc/nginx/ssl
target: /etc/nginx/ssl
# Moodle data dir
- type: bind
source: ${MOODLE_DATAROOT}
target: /opt/moodle/moodledata
# PHP configuration
- type: bind
source: ./conf/etc/php/7.2/fpm/php.ini
target: /etc/php/7.2/fpm/php.ini
- type: bind
source: ./conf/etc/php/7.2/mods-available/opcache.ini
target: /etc/php/7.2/mods-available/opcache.ini
# PHP-FPM configuration
- type: bind
source: ./conf/etc/php/7.2/fpm/php-fpm.conf
target: /etc/php/7.2/fpm/php-fpm.conf
- type: bind
source: ./conf/etc/php/7.2/fpm/pool.d/www.conf
target: /etc/php/7.2/fpm/pool.d/www.conf
postgres:
networks:
all:
image: ${DOCKER_REGISTRY_URL}/postgres:9.6
environment:
POSTGRES_DB: "${PGSQL_DATABASE}"
POSTGRES_USER: "${PGSQL_USER}"
POSTGRES_PASSWORD: "${PGSQL_PASSWORD}"
volumes:
- type: volume
source: db
target: /var/lib/postgresql/data
networks:
all:
volumes:
db: