-
Notifications
You must be signed in to change notification settings - Fork 11
/
mongo.docker-compose.yml
172 lines (171 loc) · 6.58 KB
/
mongo.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
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
services:
keycloak_db:
image: postgres:9.6-alpine
environment:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
volumes:
- "./.docker/keycloak-db/data:/var/lib/postgresql/data"
keycloak:
build: ./keycloak-storage-provider
image: "local/keycloak-sts-adapter:latest"
environment:
KEYCLOAK_PASSWORD: admin123
KEYCLOAK_USER: admin
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak
POSTGRES_PORT_5432_TCP_ADDR: keycloak_db
ports:
- "8080:8080"
- "8787:8787"
volumes:
- "./.docker/keycloak/data:/opt/jboss/keycloak/standalone/data"
links:
- keycloak_db
networks:
- sts_network
command:
- "-b"
- "0.0.0.0"
- "--debug"
post_process:
image: adorsys/keycloak-config-cli:v0.6.6-6.0.1
depends_on:
- keycloak
networks:
- sts_network
volumes:
- ./keycloak-config/docker:/tmp/keycloak-config-cli/configs
environment:
- KEYCLOAK_URL=http://keycloak:8080/auth
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin123
- WAIT_TIME_IN_SECONDS=300
- SPRING_PROFILES_INCLUDE=debug
command: config-cli
sts-mongo:
image: mongo:3.6.5
container_name: sts_mongo
environment:
MONGO_INITDB_DATABASE: sts
volumes:
- "./.docker/sts-mongo:/data/db"
ports:
- 27017:27017
command: --smallfiles
networks:
- sts_network
sts:
build: ./sts-example
image: "local/sts-example:latest"
depends_on:
- sts-mongo
networks:
- sts_network
environment:
- SPRING_PROFILES_ACTIVE=mongo
- SPRING_DATA_MONGODB_DATABASE=sts
- SPRING_DATA_MONGODB_URI=mongodb://sts-mongo/sts
- logging_level_de_adorsys_sts_keyrotation_KeyRotationSchedule=debug
- sts_secret-server-client_audience=moped-client
- sts_secret-server-client_secret-server-uri=http://sts-secret-server:8080/secret-server/token-exchange
- sts_secret-server-client_cache_enabled=true
- sts_secret-server-client_cache_maximum-size=1000
- sts_secret-server-client_cache_expire-after-access=10
- sts_authservers_0_name=local keycloak
- sts_authservers_0_iss-url=http://localhost:8080/auth/realms/moped
- sts_authservers_0_jwks-url=http://keycloak:8080/auth/realms/moped/protocol/openid-connect/certs
- sts_authservers_1_name=secret-server
- sts_authservers_1_iss-url=http://sts-secret-server:8080
- sts_authservers_1_jwks-url=http://sts-secret-server:8080/pop
- sts_resource-server-management_resource-retriever_http-connect-timeout=10000
- sts_resource-server-management_resource-retriever_http-read-timeout=60000
- sts_resource-server-management_resource-retriever_http-size-limit=512000
- sts_resource-server-management_resource-servers_0_audience=sts
- sts_resource-server-management_resource-servers_0_jwks-url=http://localhost:8888/pop
- sts_resource-server-management_resource-servers_1_audience=sts-service-component
- sts_resource-server-management_resource-servers_1_jwks-url=http://sts-service-component:8887/pop
ports:
- "8888:8888"
sts-service-component:
build: ./sts-service-component-example
image: "local/sts-service-component-example:latest"
ports:
- "8887:8887"
environment:
- sts_audience_name=sts-service-component
- SPRING_PROFILES_ACTIVE=mongo
- SPRING_DATA_MONGODB_DATABASE=sts
- SPRING_DATA_MONGODB_URI=mongodb://sts-mongo/sts
- logging_level_de_adorsys_sts_keyrotation_KeyRotationSchedule=debug
- sts_authservers_0_name=local keycloak
- sts_authservers_0_iss-url=http://localhost:8080/auth/realms/moped
- sts_authservers_0_jwks-url=http://keycloak:8080/auth/realms/moped/protocol/openid-connect/certs
depends_on:
- sts-mongo
networks:
- sts_network
sts-service-component_2:
build: ./sts-service-component-example
image: "local/sts-service-component-example:latest"
ports:
- "8886:8887"
environment:
- sts_audience_name=sts-service-component
- SPRING_PROFILES_ACTIVE=mongo
- SPRING_DATA_MONGODB_DATABASE=sts
- SPRING_DATA_MONGODB_URI=mongodb://sts-mongo/sts
- logging_level_de_adorsys_sts_keyrotation_KeyRotationSchedule=debug
- sts_authservers_0_name=local keycloak
- sts_authservers_0_iss-url=http://localhost:8080/auth/realms/moped
- sts_authservers_0_jwks-url=http://keycloak:8080/auth/realms/moped/protocol/openid-connect/certs
depends_on:
- sts-mongo
networks:
- sts_network
sts-client:
build: ./sts-client-example
image: local/sts-client-example:latest
environment:
- "NG_KEYCLOAK_AUTH_URL=http://localhost:8080/auth"
- NG_KEYCLOAK_REALM=moped
- NG_KEYCLOAK_CLIENT_ID=moped-client
- NG_KEYCLOAK_SCOPE=sts-service-component
- NG_SERVICE_URL=http://localhost:8887/helloworld
- NG_SECRET_URL=http://localhost:8888/secret
networks:
- sts_network
ports:
- 8090:8080
sts-secret-server:
build: ./sts-secret-server
image: "local/sts-secret-server:latest"
depends_on:
- sts-mongo
networks:
- sts_network
environment:
- SPRING_PROFILES_ACTIVE=mongo
- SPRING_DATA_MONGODB_DATABASE=sts
- SPRING_DATA_MONGODB_URI=mongodb://sts-mongo/sts
- sts_secret-server_secret-length=8192
- sts_secret-server_endpoint=/secret-server/token-exchange
- sts_secret-server_encryption_enabled=true
- sts_secret-server_encryption_algorithm=A256GCMKW
- sts_secret-server_encryption_encryption-method=A256GCM
- sts_secret-server_encryption_key={"kty":"oct","k":"7KmFL-k9Sib6Llt4CZnwHfxjIfAgbAbOdwbemIGhO6U"}
- sts_authservers_0_name=local keycloak
- sts_authservers_0_iss-url=http://localhost:8080/auth/realms/moped
- sts_authservers_0_jwks-url=http://keycloak:8080/auth/realms/moped/protocol/openid-connect/certs
- sts_resource-server-management_resource-retriever_http-read-timeout=60000
- sts_resource-server-management_resource-retriever_http-size-limit=512000
- sts_resource-server-management_resource-retriever_cache_enabled=true
- sts_resource-server-management_resource-retriever_cache_maximum-size=1000
- sts_resource-server-management_resource-retriever_cache_expire-after-access=10
- sts_resource-server-management_resourceservers_0_audience=moped-client
- sts_resource-server-management_resourceservers_0_jwks-url=http://sts:8888/pop
- sts_keymanagement_keystore_password=NiPae6AiOoto2Eeyaode9LeeOhngi4Ao
ports:
- "8885:8080"
networks:
sts_network: