-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
137 lines (115 loc) · 3.06 KB
/
docker-compose.yaml
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
137
version: '3'
services:
mysql:
container_name: mysqldb
image: mysql:latest
ports:
- 3366:3306
environment:
# The user, password and database that Keycloak
# is going to create and use
MYSQL_USER: keycloak_user
MYSQL_PASSWORD: keycloak_password
MYSQL_DATABASE: keycloak_db
# Self-Explanatory
MYSQL_ROOT_PASSWORD: test123
volumes:
- data_volume:/var/lib/mysql
- ./docker/volumes/mysql:/docker-entrypoint-initdb.d
keycloak:
container_name: keycloak
image: quay.io/keycloak/keycloak:latest
volumes:
- ./docker/volumes/keycloak:/opt/keycloak/data/import
environment:
KC_DB: mysql
KC_DB_URL: jdbc:mysql://mysqldb:3306/keycloak
KC_DB_USERNAME: root
KC_DB_PASSWORD: test123
KEYCLOAK_ADMIN: root
KEYCLOAK_ADMIN_PASSWORD: root
# Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the MySQL JDBC driver documentation in order to use it.
#JDBC_PARAMS: "connectTimeout=30000"
command: [ "start-dev", "--http-port=8080", "--import-realm" ]
ports:
- 8080:8080
depends_on:
- mysql
redis:
container_name: redis_container
image: redis:latest
ports:
- 6389:6379
depends_on:
- keycloak
elasticsearch:
container_name: es-container
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.0
environment:
- xpack.security.enabled=false
- "discovery.type=single-node"
ports:
- 9200:9200
depends_on:
- keycloak
kibana:
container_name: kb-container
image: docker.elastic.co/kibana/kibana:7.11.0
environment:
- ELASTICSEARCH_HOSTS=http://es-container:9200
depends_on:
- elasticsearch
ports:
- 5601:5601
discovery-service:
container_name: discovery-service
build:
context: services/system/discovery-service
dockerfile: Dockerfile
image: discovery-service:3.0
ports:
- 1111:1111
depends_on:
- elasticsearch
apis-service:
container_name: apis-service
env_file:
- docker/.env
build:
context: services/ecommerce/apis
dockerfile: Dockerfile
image: apis-service:1.0
ports:
- 8181:8181
depends_on:
- elasticsearch
volumes:
data_volume:
# mysql:
# container_name: mysql
# image: mysql
# ports:
# - 9595:3306
# environment:
# - MYSQL_ROOT_PASSWORD=test123
# keycloak:
# container_name: keycloak
# image: jboss/keycloak
# ports:
# - 8080:8080
# environment:
# - KEYCLOAK_USER=root
# - KEYCLOAK_PASSWORD=root
#
# env_file:
# - docker/envVar/.env
# environment:
# - mysql_host=mysqldb
# - mysql_port=3306
# - keycloak_host=keycloak
# - keycloak_port=8080
# - discovery_host=discovery-service
# - discovery_port=1111
# - elasticsearch_url=es-container:9200
# - redis_host=redis
# - redis_port=6379