-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
177 lines (172 loc) · 4.13 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
177 lines (172 loc) · 4.13 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
services:
db:
image: postgres:latest
container_name: openid-federation-datastore
security_opt:
- no-new-privileges:true
env_file:
- path: .env
required: false
- path: .env.local
required: false
environment:
- POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_DB
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- openid_network
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d ${DATASOURCE_DB} -U ${DATASOURCE_USER}" ]
interval: 3s
timeout: 5s
retries: 20
openid-federation-server:
image: sphereon/openid-federation-server:latest
build:
context: .
dockerfile: ./.docker/openid-federation-server/Dockerfile
deploy:
resources:
limits:
cpus: '1.5'
memory: 1536M
reservations:
cpus: '0.5'
memory: 768M
ports:
- "8080:8080"
env_file:
- path: .env
required: false
- path: .env.local
required: false
environment:
- DATASOURCE_URL
DATASOURCE_USER
DATASOURCE_PASSWORD
APP_KEY
KMS_PROVIDER
ROOT_IDENTIFIER
DEV_MODE
LOGGER_SEVERITY
depends_on:
db:
condition: service_healthy
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- ./logs/openid-federation-server:/tmp/logs
networks:
- openid_network
openid-federation-admin-server:
image: sphereon/openid-federation-admin-server:latest
build:
context: .
dockerfile: ./.docker/openid-federation-admin-server/Dockerfile
deploy:
resources:
limits:
cpus: '1.5'
memory: 1536M
reservations:
cpus: '0.5'
memory: 768M
ports:
- "8081:8080"
env_file:
- path: .env
required: false
- path: .env.local
required: false
environment:
- DATASOURCE_URL
DATASOURCE_USER
DATASOURCE_PASSWORD
APP_KEY
KMS_PROVIDER
ROOT_IDENTIFIER
OAUTH2_RESOURCE_SERVER_JWT_ISSUER_URI
DEV_MODE
LOGGER_SEVERITY
LOGGER_OUTPUT
depends_on:
db:
condition: service_healthy
networks:
- openid_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- ./logs/openid-federation-admin-server:/tmp/logs
keycloak:
image: keycloak/keycloak:26.0
user: keycloak
security_opt:
- no-new-privileges:true
command:
- start-dev
- --import-realm
deploy:
resources:
limits:
cpus: '1.5'
memory: 1536M
reservations:
cpus: '0.5'
memory: 768M
ports:
- "8082:8080"
env_file:
- path: .env
required: false
- path: .env.local
required: false
environment:
- KC_BOOTSTRAP_ADMIN_USERNAME
- KC_BOOTSTRAP_ADMIN_PASSWORD
- KC_HEALTH_ENABLED
- JAVA_OPTS
# - KC_BOOTSTRAP_ADMIN_USERNAME=${KC_BOOTSTRAP_ADMIN_USERNAME}
# - KC_BOOTSTRAP_ADMIN_PASSWORD=${KC_BOOTSTRAP_ADMIN_PASSWORD}
# - KC_HEALTH_ENABLED=true
# - JAVA_OPTS=-XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=50.0 -XX:+UseG1GC
volumes:
- ./.docker/keycloak:/opt/keycloak/data/import/
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- openid_network
healthcheck:
test: [ "CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000; echo -e 'GET /health/ready HTTP/1.1\r\nHost: localhost:9000\r\nConnection: close\r\n\r\n' >&3;cat <&3 | grep -q '\"status\": \"UP\"' && exit 0 || exit 1" ]
interval: 3s
timeout: 10s
retries: 10
start_period: 10s
networks:
openid_network:
driver: bridge
volumes:
postgres_data:
local_kms_data:
logs: