-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
54 lines (54 loc) · 1.98 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
version: '2.1'
services:
db:
image: mysql:5.7
volumes:
- mysql_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_bin
healthcheck:
test: ["CMD", "mysqladmin", "-u$MYSQL_USER", "-p$MYSQL_PASSWORD", "ping", "-h", "localhost", "--silent"]
timeout: 5s
retries: 10
web:
build:
context: .
dockerfile: Dockerfile-web
depends_on:
db:
condition: service_healthy
ports:
- "$MOJITO_PORT:8080"
restart: always
environment:
SPRING_APPLICATION_JSON: '{
"flyway.enabled": "true",
"spring.jpa.database" : "MYSQL",
"spring.jpa.database-platform" : "org.hibernate.dialect.MySQLDialect",
"spring.jpa.hibernate.ddl-auto" : "none",
"spring.datasource.url" : "jdbc:mysql://db:3306/mojito?characterEncoding=UTF-8&useUnicode=true",
"spring.datasource.username" : "$MYSQL_USER",
"spring.datasource.password" : "$MYSQL_PASSWORD",
"spring.datasource.driverClassName" : "com.mysql.jdbc.Driver",
"spring.datasource" : "true",
"spring.datasource.validation-query" : "SELECT 1",
"l10n.security.authenticationType" : "$AUTHENTICATION_TYPE",
"l10n.security.ldap.url" : "$LDAP_URL",
"l10n.security.ldap.port" : "$LDAP_PORT",
"l10n.security.ldap.root" : "$LDAP_ROOT",
"l10n.security.ldap.userSearchBase" : "$LDAP_USER_SEARCH_BASE",
"l10n.security.ldap.userSearchFilter" : "$LDAP_USER_SEARCH_FILTER",
"l10n.security.ldap.groupSearchBase" : "$LDAP_GROUP_SEARCH_BASE",
"l10n.security.ldap.groupRoleAttribute" : "$LDAP_GROUP_ROLE_ATTRIBUTE",
"l10n.security.ldap.managerDn" : "$LDAP_MANAGER_DN",
"l10n.security.ldap.managerPassword" : "$LDAP_MANAGER_PASSWORD"
}'
volumes:
mysql_data: