-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathdocker-compose.yml
130 lines (114 loc) · 4.47 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
version: '3.9'
services:
# REVERSE PROXY
## https://doc.traefik.io/traefik/
reverse-proxy:
image: traefik:2.9.8
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# APPLICATIONS
election-management:
extends:
file: common.yml
service: quarkus
build:
context: ./election-management
# dockerfile: src/main/docker/Dockerfile.native
dockerfile: src/main/docker/Dockerfile.jvm
image: dio/election-management:${TAG:-1.0.0}
labels:
- traefik.http.routers.election-management.rule=Host(`vote.dio.localhost`) && PathPrefix(`/api`)
- traefik.http.routers.election-management.entrypoints=web
voting-app:
extends:
file: common.yml
service: quarkus
build:
context: ./voting-app
# dockerfile: src/main/docker/Dockerfile.native
dockerfile: src/main/docker/Dockerfile.jvm
image: dio/voting-app:${TAG:-1.0.0}
labels:
- traefik.http.routers.voting-app.rule=Host(`vote.dio.localhost`) && PathPrefix(`/api/voting`)
- traefik.http.routers.voting-app.entrypoints=web
result-app:
extends:
file: common.yml
service: quarkus
build:
context: ./result-app
# dockerfile: src/main/docker/Dockerfile.native
dockerfile: src/main/docker/Dockerfile.jvm
image: dio/result-app:${TAG:-1.0.0}
labels:
- traefik.http.routers.result-app.rule=Host(`vote.dio.localhost`) && Path(`/`)
- traefik.http.routers.result-app.entrypoints=web
# DATABASE - https://quarkus.io/guides/datasource
## https://mariadb.org/
database:
image: mariadb:10.11.2
environment:
- MARIADB_ROOT_PASSWORD=root
# CACHING - https://quarkus.io/guides/redis
## https://redis.io/
caching:
image: redis:7.0.9
# LOGGING - https://quarkus.io/guides/centralized-log-management
## https://www.mongodb.com/
mongodb:
image: mongo:6.0.4
## https://opensearch.org/
opensearch:
image: opensearchproject/opensearch:2.6.0
environment:
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
- bootstrap.memory_lock=true
- discovery.type=single-node
- action.auto_create_index=false
- plugins.security.ssl.http.enabled=false
- plugins.security.disabled=true
## https://www.graylog.org/
### Graylog web console (System → Input → Select GELF UDP)
### curl -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "X-Requested-By: curl" -X POST -v -d '{"title":"udp input","configuration":{"recv_buffer_size":262144,"bind_address":"0.0.0.0","port":12201,"decompress_size_limit":8388608},"type":"org.graylog2.inputs.gelf.udp.GELFUDPInput","global":true}' http://logging.private.dio.localhost/api/system/inputs
graylog:
image: graylog/graylog:5.0.5
environment:
GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9000/"
GRAYLOG_PASSWORD_SECRET: "forpasswordencryption" # CHANGE ME (must be at least 16 characters)!
GRAYLOG_ROOT_PASSWORD_SHA2: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918" # Password: admin
GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000"
GRAYLOG_ELASTICSEARCH_HOSTS: "http://opensearch:9200"
GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
depends_on:
opensearch:
condition: service_started
mongodb:
condition: service_started
labels:
- traefik.enable=true
- traefik.http.routers.graylog.rule=Host(`logging.private.dio.localhost`)
- traefik.http.routers.graylog.entrypoints=web
- traefik.http.routers.graylog.service=graylog
- traefik.http.services.graylog.loadbalancer.server.port=9000
# OPENTELEMETRY - https://quarkus.io/guides/opentelemetry
## https://www.jaegertracing.io/
jaeger:
image: jaegertracing/all-in-one:1.42.0
environment:
- COLLECTOR_OTLP_ENABLED=true
labels:
- traefik.enable=true
- traefik.http.middlewares.admin-admin-auth.basicauth.users=admin:$$2y$$05$$B3PS97vYDsx6Hk4e/F8bSOGdB2uq.oabTU7SbMdjJKxdAeKKI8pTO
- traefik.http.routers.jaeger.rule=Host(`telemetry.private.dio.localhost`)
- traefik.http.routers.jaeger.entrypoints=web
- traefik.http.routers.jaeger.service=jaeger
- traefik.http.routers.jaeger.middlewares=admin-admin-auth@docker
- traefik.http.services.jaeger.loadbalancer.server.port=16686