generated from CodelyTV/java-basic-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 205
/
docker-compose.yml
executable file
·113 lines (105 loc) · 3.02 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
version: '3'
services:
shared_mysql:
container_name: codely-java_ddd_example-mysql
image: mysql:8
platform: linux/amd64
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
entrypoint:
sh -c "
echo 'CREATE DATABASE IF NOT EXISTS mooc;CREATE DATABASE IF NOT EXISTS backoffice;' > /docker-entrypoint-initdb.d/init.sql;
/usr/local/bin/docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
"
command: ["--default-authentication-plugin=mysql_native_password"]
shared_rabbitmq:
container_name: codely-java_ddd_example-rabbitmq
image: 'rabbitmq:3.7-management'
platform: linux/amd64
restart: unless-stopped
ports:
- "5630:5672"
- "8090:15672"
environment:
- RABBITMQ_DEFAULT_USER=codely
- RABBITMQ_DEFAULT_PASS=c0d3ly
backoffice_elasticsearch:
container_name: codely-java_ddd_example-elasticsearch
image: 'elasticsearch:6.8.4'
platform: linux/amd64
restart: unless-stopped
ports:
- "9300:9300"
- "9200:9200"
environment:
- discovery.type=single-node
backoffice_backend_server_java:
container_name: codely-java_ddd_example-backoffice_backend_server
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8040:8040"
volumes:
- .:/app:delegated
- backoffice_backend_gradle_cache:/app/.gradle
depends_on:
- shared_mysql
- shared_rabbitmq
- backoffice_elasticsearch
command: ["./gradlew", "bootRun", "--args", "backoffice_backend server"]
backoffice_frontend_server_java:
container_name: codely-java_ddd_example-backoffice_frontend_server
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8041:8041"
volumes:
- .:/app:delegated
- backoffice_frontend_gradle_cache:/app/.gradle
depends_on:
- shared_mysql
- shared_rabbitmq
- backoffice_elasticsearch
command: ["./gradlew", "bootRun", "--args", "backoffice_frontend server"]
mooc_backend_server_java:
container_name: codely-java_ddd_example-mooc_backend_server
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8030:8030"
volumes:
- .:/app:delegated
- mooc_backend_gradle_cache:/app/.gradle
depends_on:
- shared_mysql
- shared_rabbitmq
- backoffice_elasticsearch
command: ["./gradlew", "bootRun", "--args", "mooc_backend server"]
test_server_java:
container_name: codely-java_ddd_example-test_server
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
volumes:
- .:/app:delegated
- test_gradle_cache:/app/.gradle
depends_on:
- shared_mysql
- shared_rabbitmq
- backoffice_elasticsearch
tty: true
volumes:
backoffice_backend_gradle_cache:
backoffice_frontend_gradle_cache:
mooc_backend_gradle_cache:
test_gradle_cache: