-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
100 lines (94 loc) · 3.03 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
# Use postgres/example user/password credentials
version: '3.1'
services:
app:
image: 'app'
build:
context: .
container_name: wa2_g34_app
depends_on:
- db
- auth
environment:
- spring.datasource.url=jdbc:postgresql://db:5432/postgres
- spring.datasource.username=postgres
- spring.datasource.password=password
- spring.jpa.hibernate.ddl-auto=validate
- spring.security.oauth2.resourceserver.jwt.issuer-uri=http://auth:8080/realms/WA2_G34
- spring.application.observer_host=localhost
- keykloak.client.id=springweb-app
- keykloak.client.secret=wBQqSrSQleTgwQXpf04tG0phNSYP0Ps4
- keykloak.client.url=http://auth:8080/
ports:
- ${APP_PORT}:8081
db:
container_name: db
image: postgres
restart: always
depends_on:
- auth
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
ports:
- 5432:5432
volumes:
- ${ROOT_PATH}/res/dump.sql:/docker-entrypoint-initdb.d/dump.sql
auth:
container_name: auth
image: quay.io/keycloak/keycloak:21.1.1
ports:
- ${KC_PORT}:8080
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_METRICS: true
KC_HEALTH: true
command:
- start-dev
- --import-realm
volumes:
- ${ROOT_PATH}/res/realm.json:/opt/keycloak/data/import/realm.json
tempo:
image: grafana/tempo
extra_hosts: [ 'host.docker.internal:host-gateway' ]
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ${ROOT_PATH}/docker_configs/tempo/tempo-local.yaml:/etc/tempo.yaml:ro
- ${ROOT_PATH}/docker_configs/tempo-data:/tmp/tempo
ports:
# - "14268" # jaeger ingest
- "9411:9411" # zipkin
loki:
image: grafana/loki
extra_hosts: [ 'host.docker.internal:host-gateway' ]
command: [ "-config.file=/etc/loki/local-config.yaml" ]
ports:
- "3100:3100" # loki needs to be exposed so it receives logs
environment:
- JAEGER_AGENT_HOST=tempo
- JAEGER_ENDPOINT=http://tempo:14268/api/traces # send traces to Tempo
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
prometheus:
image: prom/prometheus
extra_hosts: [ 'host.docker.internal:host-gateway' ]
command:
- --enable-feature=exemplar-storage
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ${ROOT_PATH}/docker_configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "${PROMETHEUS_PORT}:9090"
grafana:
image: grafana/grafana
extra_hosts: [ 'host.docker.internal:host-gateway' ]
volumes:
- ${ROOT_PATH}/docker_configs/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
- ${ROOT_PATH}/docker_configs/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "${GRAFANA_PORT}:3000"