-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-auth.yml
More file actions
100 lines (94 loc) · 3.39 KB
/
docker-compose-auth.yml
File metadata and controls
100 lines (94 loc) · 3.39 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
version: '3.8'
services:
app:
build: .
image: hackathon-app
ports:
- '8083:8081'
networks:
- backend
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: 'jdbc:mariadb://db-hackathon:3306/hackathon?useLegacyDatetimeCode=false&serverTimezone=CET'
SPRING_DATASOURCE_USERNAME: 'hackathon'
SPRING_DATASOURCE_PASSWORD: 'hackathon'
SERVER_USE_FORWARD_HEADERS: 'true'
SERVER_FORWARD_HEADERS_STRATEGY: 'FRAMEWORK'
KEYCLOAK_AUTH-SERVER-URL: '${HOST_URL}'
SSL_REQUIRED: 'external'
KEYCLOAK_REALM: 'citydashboard'
KEYCLOAK_RESOURCE: 'citydashboard'
depends_on:
db-hackathon:
condition: service_healthy
grafana:
image: grafana/grafana-oss:9.0.2
ports:
- '3001:3001'
networks:
- backend
volumes:
# - grafana-data:/var/lib/grafana
#- ./grafana/default.ini:/etc/grafana/grafana.ini
- ./grafana/dashboards:/etc/grafana/provisioning/dashboard_files
- ./grafana/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
- ./grafana/dashboard_provider.yaml:/etc/grafana/provisioning/dashboards/dashboard_provider.yaml
environment:
GF_SERVER_HTTP_PORT: 3001
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3001/
GF_LOG_FILTERS: rendering:debug
GF_LOG_FILTERS: auth:debug
GF_SECURITY_ADMIN_USER: 'admin'
GF_SECURITY_ADMIN_PASSWORD: 'adminadmin'
GF_AUTH_DISABLE_LOGIN_FORM: 'true'
GF_AUTH_GENERIC_OAUTH_ENABLED: 'true'
GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP: 'true'
GF_AUTH_GENERIC_OAUTH_NAME: 'OAuth'
GF_AUTH_GENERIC_OAUTH_CLIENT_ID: 'citydashboard'
GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH: 'Viewer'
GF_AUTH_GENERIC_OAUTH_SCOPES: 'openid profile email'
GF_AUTH_GENERIC_OAUTH_TOKEN_URL: '${HOST_URL}/realms/citydashboard/protocol/openid-connect/token'
GF_AUTH_GENERIC_OAUTH_AUTH_URL: '${HOST_URL}/realms/citydashboard/protocol/openid-connect/auth'
GF_AUTH_GENERIC_OAUTH_API_URL: '${HOST_URL}/realms/citydashboard/protocol/openid-connect/userinfo'
GF_AUTH_BASIC_ENABLED: 'false'
GF_SECURITY_ALLOW_EMBEDDING: 'true'
GF_AUTH_ANONYMOUS_ENABLED: 'false'
depends_on:
db-hackathon:
condition: service_healthy
renderer:
image: grafana/grafana-image-renderer:latest
networks:
- backend
ports:
- 3002:8081
db-hackathon:
image: mariadb:latest
restart: on-failure
environment:
MYSQL_DATABASE: 'hackathon'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'hackathon'
# You can use whatever password you like
MYSQL_PASSWORD: 'hackathon'
# Root password for local debugging
MYSQL_ROOT_PASSWORD: 'root'
# Password for root access
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3308:3306'
healthcheck:
test: ["CMD", "mysql" ,"-h", "localhost", "-P", "3306", "-u", "hackathon", "--password=hackathon", "-e", "select 1", "hackathon"]
interval: 5s
timeout: 60s
retries: 30
volumes:
- hackathonv2-db-data:/var/lib/mysql
networks: # Networks to join (Services on the same network can communicate with each other using their name)
- backend
volumes:
hackathonv2-db-data:
networks:
backend: