-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdocker-compose.yml
123 lines (118 loc) · 3.18 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
services:
# Servicio de postgres:
postgres:
image: "moodledev/postgres:${POSTGRES_VERSION_TAG}-${PG_LOCALE}"
build:
context: ./postgres
args:
ARG_POSTGRES_IMAGE_FROM: quay.io/krestomatio/postgres:${POSTGRES_VERSION_TAG}
POSTGRES_UID: ${UID:-1000}
MY_TZ: ${MY_TZ}
expose:
- "${PG_PORT}"
# Uncomment following lines to expose postgres to host network
# ports:
# - "${IP}:${PG_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./db_dumps:/opt/db_dumps:z
environment:
POSTGRES_PORT: "${PG_PORT}"
POSTGRESQL_DATABASE: "${POSTGRES_DB}"
POSTGRESQL_USER: "${POSTGRES_USER}"
POSTGRESQL_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRESQL_ADMIN_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRESQL_LOG_STDERR: true
# Servicio de PHP-FPM
php-fpm:
image: "moodledev/php:${PHP_VERSION_TAG}"
build:
context: ./php-fpm
args:
ARG_PHP_FPM_IMAGE_FROM: docker.io/php:${PHP_VERSION_TAG}
PHP_UID: ${UID:-1000}
MY_TZ: ${MY_TZ}
DOCUMENT_ROOT: ${DOCUMENT_ROOT}
environment:
- XDEBUG_CONFIG=idekey=PHPTEST
- PHP_IDE_CONFIG=serverName=localhost
- PHP_FPM_PORT
- DOCUMENT_ROOT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- MOODLE_DATA
- WWWROOT
- WWW_PORT
- MOODLE_INSTALL_UNATTENDED
- MOODLE_INSTALL_LANG
- MOODLE_INSTALL_FULLNAME
- MOODLE_INSTALL_SHORTNAME
- MOODLE_INSTALL_SUMMARY
- MOODLE_INSTALL_USER
- MOODLE_INSTALL_PASS
- MOODLE_INSTALL_EMAIL
# Uncomment following lines and modify variable content for CUSTOM_CA
# - |-
# CA_CERT=-----BEGIN CERTIFICATE-----
# REPLACE_CA_CONTENT
# -----END CERTIFICATE-----
volumes:
- ./${REPO_FOLDER}:${DOCUMENT_ROOT}:z
- ./moodledata:${MOODLE_DATA}:z
- ./log:/var/log/shared:z
expose:
- "${PHP_FPM_PORT}"
links:
- postgres
depends_on:
- postgres
# Servicio de nginx
nginx:
image: moodledev/nginx:${NGINX_VERSION_TAG}
build:
context: ./nginx
args:
ARG_NGINX_IMAGE_FROM: quay.io/krestomatio/nginx:${NGINX_VERSION_TAG}
NGINX_UID: ${UID:-1000}
volumes:
- ./${REPO_FOLDER}:${DOCUMENT_ROOT}:z
- ./moodledata:${MOODLE_DATA}:z
ports:
- "${IP}:${WWW_PORT}:8080"
environment:
NGINX_DOCUMENTROOT: ${DOCUMENT_ROOT}
NGINX_FASTCGI_PASS: php-fpm:${PHP_FPM_PORT}
NGINX_PORT: ${WWW_PORT}
links:
- php-fpm
- postgres
depends_on:
- php-fpm
# Cron para moodle
cron:
image: moodledev/php:${PHP_VERSION_TAG}-cron
build:
context: ./cron
args:
ARG_CRON_IMAGE_FROM: "moodledev/php:${PHP_VERSION_TAG}"
DOCUMENT_ROOT: ${DOCUMENT_ROOT}
volumes:
- ./${REPO_FOLDER}:${DOCUMENT_ROOT}:z
- ./moodledata:${MOODLE_DATA}:z
depends_on:
- nginx
# Gestor de base de datos
pgadmin:
image: "docker.io/foxylion/pgadmin4"
ports:
- "${IP}:5050:80"
links:
- postgres
volumes:
- ./db_dumps:/root:z
depends_on:
- postgres
volumes:
postgres_data:
driver: "local"