-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
136 lines (125 loc) · 4.55 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
124
125
126
127
128
129
130
131
132
133
134
135
136
version: '2'
services:
lb:
restart: always
image: 'dockercloud/haproxy:latest'
networks:
- front
links:
- web
- prosody
ports:
# Web
- '443:443' # HTTPS
- '80:80' # HTTP Needs to be exposed for http->https redirection to work
# Prosody (not sure these are all used)
- 5222:5222 # c2s port
- 5269:5269 # s2s port
- 5347:5347 # XMPP component port
- 5280:5280 # BOSH / websocket port
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- certs:/certs/ # This is where the haproxy ssl certificates live
environment:
CERT_FOLDER: /certs/
# See README on how to obtain/update let's encrypt certificates
certbot:
build: certbot/
volumes:
- data:/var/www/html/claroline
- le:/etc/letsencrypt/
- certs:/certs/ # This is where the ssl certificates live
environment:
CERT_EMAIL: ${CERT_EMAIL}
DOMAIN_NAME: ${APP_URL}
web:
restart: always
build: web/
networks:
- front
- db
extra_hosts:
- "${APP_URL}:172.16.238.10" # This is needed so that web can talk to the lb in the case of a local installation.
volumes:
- data:/var/www/html/claroline # This is where the symfony files are stored
- certs:/certs/ # This is where the ssl certificates live # This probably should not live in the web container
environment:
VIRTUAL_HOST: https://${APP_URL}, http://${APP_URL} # Both http and https are needed for http->https redirection to work
FORCE_SSL: "yes" # Force redirech http to https
APP_URL: ${APP_URL}
DB_HOST: db
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
SECRET: ${SECRET}
# These will be the default platform options, they are only used once during the Claroline Connect install
PLATFORM_NAME: ${PLATFORM_NAME}
PLATFORM_SUPPORT_EMAIL: ${PLATFORM_SUPPORT_EMAIL}
PLATFORM_SSL_ENABLED: ${PLATFORM_SSL_ENABLED}
PLATFORM_LOCALE_LANGUAGE: ${PLATFORM_LOCALE_LANGUAGE}
PLATFORM_THEME: ${PLATFORM_THEME}
PLATFORM_MAILER_TRANSPORT: ${PLATFORM_MAILER_TRANSPORT}
PLATFORM_MAILER_HOST: ${PLATFORM_MAILER_HOST}
PLATFORM_MAILER_PORT: ${PLATFORM_MAILER_PORT}
PLATFORM_MAILER_ENCRYPTION: ${PLATFORM_MAILER_ENCRYPTION}
PLATFORM_MAILER_USERNAME: ${PLATFORM_MAILER_USERNAME}
PLATFORM_MAILER_PASSWORD: ${PLATFORM_MAILER_PASSWORD}
PLATFORM_MAILER_AUTH_MODE: ${PLATFORM_MAILER_AUTH_MODE}
PLATFORM_MAX_STORAGE_SIZE: ${PLATFORM_MAX_STORAGE_SIZE}
PLATFORM_MAX_UPLOAD_RESOURCES: ${PLATFORM_MAX_UPLOAD_RESOURCES}
PLATFORM_MAX_WORKSPACE_USERS: ${PLATFORM_MAX_WORKSPACE_USERS}
PLATFORM_IS_PDF_EXPORT_ACTIVE: ${PLATFORM_IS_PDF_EXPORT_ACTIVE}
PLATFORM_CHAT_XMPP_HOST: ${APP_URL}
PLATFORM_CHAT_ADMIN_USERNAME: ${PLATFORM_CHAT_ADMIN_USERNAME}
PLATFORM_CHAT_ADMIN_PASSWORD: ${PLATFORM_CHAT_ADMIN_PASSWORD}
PLATFORM_CHAT_BOSH_PORT: ${PLATFORM_CHAT_BOSH_PORT}
PLATFORM_CHAT_SSL: ${PLATFORM_CHAT_SSL}
PLATFORM_CHAT_XMPP_MUC_HOST: ${PLATFORM_CHAT_XMPP_MUC_HOST}
# The first user to be created, this is only used once during the Claroline Connect install
ADMIN_FIRSTNAME: ${ADMIN_FIRSTNAME}
ADMIN_LASTNAME: ${ADMIN_LASTNAME}
ADMIN_USERNAME: ${ADMIN_USERNAME}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
ADMIN_EMAIL: ${ADMIN_EMAIL}
db:
restart: always
image: mysql
networks:
- db
volumes:
- ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
prosody:
restart: always
build: prosody/
volumes:
- prosody:/var/lib/prosody # The prosody data lives here
environment:
TCP_PORTS: "5222/ssl, 5269/ssl, 5347/ssl, 5280/ssl"
LOCAL: ${PLATFORM_CHAT_ADMIN_USERNAME}
PASSWORD: ${PLATFORM_CHAT_ADMIN_PASSWORD}
DOMAIN: ${APP_URL}
networks:
- front
networks:
front: # The frontend network
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1
- subnet: 2001:3984:3989::/64
gateway: 2001:3984:3989::1
db: # The database network
volumes:
data: # This is where the symfony files are stored
mysql: # This is where the mysql data lives
certs: # This is where the haproxy ssl certificates live
prosody: # The prosody data lives here
le: # This is where the letsencrypt ssl certificates live