-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.infra.yml
More file actions
191 lines (178 loc) · 4.28 KB
/
docker-compose.infra.yml
File metadata and controls
191 lines (178 loc) · 4.28 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
version: '3.4'
services:
api:
profiles: [ "minimal", "log" ]
container_name: kong
build:
context: ./infra/api
volumes:
- ./infra/api/kong.yml:/kong.yml
environment:
- LC_CTYPE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- KONG_DATABASE=off
- KONG_DECLARATIVE_CONFIG=/kong.yml
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
ports:
- 8000:8000
#mem_limit: 300m
networks:
- eshop
redis:
profiles: [ "minimal", "log" ]
image: redis:7.0.4
container_name: redis-front
ports:
- 6379:6379
networks:
- eshop
postgres:
profiles: [ "minimal", "log" ]
image: postgres:14.4
container_name: postgres
ports:
- "5432:5432"
environment:
{
"POSTGRES_DB": "eshop_db",
"POSTGRES_USER": "eshop_user",
"POSTGRES_PASSWORD": "eshop_pass"
}
healthcheck:
test:
[
"CMD",
"pg_isready",
"--dbname=eshop_db",
"--username=eshop_user"
]
interval: 5s
timeout: 5s
retries: 5
networks:
- eshop
rabbitmq:
profiles: [ "minimal", "log" ]
container_name: rabbitmq
hostname: rabbitmq
build:
context: ./infra/rabbitmq
volumes:
- rabbitmq_data:/var/lib/rabbitmq/mnesia
ports:
- "15672:15672" #management # habilitado visualiza��o no browser
#- "15692:15692" #prometheus # desnecess�rio
- "5672:5672" #amqp
healthcheck:
test:
[
"CMD-SHELL",
"curl -I -s -L http://localhost:15672 || exit 1"
]
interval: 30s
timeout: 20s
retries: 5
networks:
- eshop
- log
minio:
profiles: [ "minimal", "log" ]
container_name: minio
image: quay.io/minio/minio
ports:
- 9000:9000
- 9001:9001
command:
[
"server",
"/data",
"--console-address",
":9001",
"--address",
":9000"
]
environment: { "MINIO_DOMAIN": "minio,localhost" }
volumes:
- minio_data:/data
networks:
- eshop
logstash:
profiles: [ "log" ]
container_name: log_logstash
hostname: logstash
image: opensearchproject/logstash-oss-with-opensearch-output-plugin
environment: { "TZ": "America/Sao_Paulo" }
volumes:
- ./infra/eal/logstash/logstash.conf:/usr/share/logstash/logstash.conf
command: -f logstash.conf
depends_on:
rabbitmq:
condition: service_healthy
opensearch:
condition: service_healthy
networks:
- log
opensearch:
profiles: [ "log" ]
image: opensearchproject/opensearch:latest
container_name: opensearch
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch
- discovery.seed_hosts=opensearch
- cluster.initial_cluster_manager_nodes=opensearch
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
healthcheck:
test:
[
"CMD-SHELL",
"curl -I -s -k https://localhost:9200 || exit 1"
]
interval: 30s
timeout: 20s
retries: 5
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- opensearch_data:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- log
opensearch-dashboards:
profiles: [ "log" ]
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- "5601"
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
networks:
- log
depends_on:
opensearch:
condition: service_healthy
networks:
eshop:
driver: bridge
name: eshop
log:
driver: bridge
name: log
volumes:
rabbitmq_data:
pgadmin_data:
minio_data:
opensearch_data: