-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
98 lines (87 loc) · 2.62 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
services:
# Applications
book-service:
# Build image with "./gradlew bootBuildImage from book-service project"
image: book-service:main
container_name: book-service
depends_on:
- keycloak
ports:
- 9001:9001
environment:
- LOKI_URI=http://loki:3100/loki/api/v1/push
- MANAGEMENT_ZIPKIN_TRACING_ENDPOINT=http://tempo:9411
- SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI=http://host.docker.internal:8080/realms/PolarBookshop
edge-service:
# Build image with "./gradlew bootBuildImage from edge-service project"
image: edge-service:main
container_name: edge-service
depends_on:
- keycloak
- redis
ports:
- 9000:9000
environment:
- BOOK_SERVICE_URL=http://book-service:9001
- LOKI_URI=http://loki:3100/loki/api/v1/push
- MANAGEMENT_ZIPKIN_TRACING_ENDPOINT=http://tempo:9411
- SPRING_DATA_REDIS_HOST=redis
- SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_ISSUER_URI=http://host.docker.internal:8080/realms/PolarBookshop
# Backing Services
redis:
image: redis:7
container_name: redis
ports:
- 6379:6379
keycloak:
image: quay.io/keycloak/keycloak:19.0
container_name: keycloak
command: start-dev --import-realm
volumes:
- ./platform/keycloak:/opt/keycloak/data/import
environment:
- KEYCLOAK_ADMIN=user
- KEYCLOAK_ADMIN_PASSWORD=password
ports:
- 8080:8080
# Observability
grafana:
image: grafana/grafana:9.3.6
container_name: grafana
depends_on:
- loki
- prometheus
- tempo
ports:
- "3000:3000"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
volumes:
- ./platform/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./platform/grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./platform/grafana/grafana.ini:/etc/grafana/grafana.ini
loki:
image: grafana/loki:2.7.3
container_name: loki
command: -config.file=/etc/loki/local-config.yaml
ports:
- "3100:3100"
prometheus:
image: prom/prometheus:v2.42.0
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./platform/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
tempo:
image: grafana/tempo:2.0.0
container_name: tempo
command: -config.file /etc/tempo-config.yml
ports:
- "3110:3100" # Tempo
- "4317:4317" # OTLP
- "9411:9411" # Zipkin
volumes:
- ./platform/tempo/tempo.yml:/etc/tempo-config.yml