forked from jobcespedes/docker-compose-moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
118 lines (111 loc) · 2.58 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
version: '2.1'
services:
# Aplicación
app:
image: tianon/true
volumes:
- ./${REPO_FOLDER}:${DOCUMENT_ROOT}:z
- ./moodledata:${MOODLE_DATA}:z
# Uncomment following lines and modify path for CUSTOM_CA
# - /usr/local/share/ca-certificates/overcloud-cacert-mo.crt:/usr/local/share/ca-certificates/custom-ca.crt
# Servicio de postgres:
postgres:
image: "metics/postgres:9.6-${PG_LOCALE}"
build:
context: .
dockerfile: postgres/Dockerfile
args:
locale: "${PG_LOCALE}"
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_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
depends_on:
- app
# Servicio de PHP-FPM
php-fpm:
image: "metics/php-fpm:7"
build:
context: .
dockerfile: php-fpm/Dockerfile
args:
- DOCUMENT_ROOT
- MY_TZ
environment:
- XDEBUG_CONFIG=idekey=PHPTEST
- PHP_IDE_CONFIG=serverName=localhost
- DOCUMENT_ROOT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- MOODLE_DATA
- WWWROOT
- WWW_PORT
# Uncomment following lines and modify variable content for CUSTOM_CA
# - |-
# CA_CERT=-----BEGIN CERTIFICATE-----
# REPLACE_CA_CONTENT
# -----END CERTIFICATE-----
volumes_from:
- app
volumes:
- ./log:/var/log/shared:z
expose:
- "${PHP_SOCKET}"
links:
- postgres
depends_on:
- postgres
# Servicio de Apache2
apache2:
image: metics/apache2:2.4
build:
context: .
dockerfile: apache2/Dockerfile
args:
DOCUMENT_ROOT: ${DOCUMENT_ROOT}
PHP_SOCKET: php-fpm:${PHP_SOCKET}
ALIAS_DOMAIN: ${ALIAS_DOMAIN}
volumes_from:
- app
ports:
- "${IP}:${WWW_PORT}:80"
links:
- php-fpm
- postgres
depends_on:
- php-fpm
# Cron para moodle
cron:
image: metics/php-fpm:7-cron
build:
context: .
dockerfile: cron/Dockerfile
args:
DOCUMENT_ROOT: ${DOCUMENT_ROOT}
volumes_from:
- app
depends_on:
- apache2
# Gestor de base de datos
pgadmin:
image: "foxylion/pgadmin4"
ports:
- "${IP}:5050:80"
links:
- postgres
volumes:
- ./db_dumps:/root:z
depends_on:
- postgres
volumes:
postgres-data:
driver: "local"