-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-postgresql.yml
182 lines (172 loc) · 4.85 KB
/
docker-compose-postgresql.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
173
174
175
176
177
178
179
180
181
182
# SPDX-FileCopyrightText: 2021 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0
version: "3.9"
services:
postgresql:
labels:
compas: true
image: "postgres:16.2"
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=compas
- PGDATA=/var/lib/postgresql/data/compas
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 15s
timeout: 10s
retries: 5
volumes:
- postgresql-data-volume:/var/lib/postgresql/data
keycloak:
build:
context: ./keycloak
args:
COMPAS_HOSTNAME: ${COMPAS_HOSTNAME}
labels:
compas: true
ports:
- "8089:8080"
environment:
- KC_HOSTNAME=http://${COMPAS_HOSTNAME}/auth/
- KC_HTTP_RELATIVE_PATH=auth
- KC_HTTP_ENABLED=true
- KC_PROXY_HEADERS=xforwarded
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/"]
interval: 30s
timeout: 10s
retries: 5
scl-data-service:
labels:
compas: true
image: "lfenergy/compas-scl-data-service:0.15.0-postgresql"
ports:
- "9090:8080"
environment:
- POSTGRESQL_HOST=postgresql
- POSTGRESQL_DB=compas
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
- JWT_VERIFY_CLIENT_ID=scl-data-service
- JWT_GROUPS_PATH=resource_access/scl-data-service/roles
- USERINFO_NAME_CLAIMNAME=name
- USERINFO_WHO_CLAIMNAME=name
- USERINFO_SESSION_WARNING=20
- USERINFO_SESSION_EXPIRES=30
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-data-service/q/health/ready"]
interval: 15s
timeout: 10s
retries: 5
depends_on:
- postgresql
- keycloak
cim-mapping:
labels:
compas: true
image: "lfenergy/compas-cim-mapping:0.10.4"
ports:
- "9091:8080"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
- JWT_VERIFY_CLIENT_ID=cim-mapping
- JWT_GROUPS_PATH=resource_access/cim-mapping/roles
- USERINFO_WHO_CLAIMNAME=name
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-cim-mapping/q/health/ready"]
interval: 15s
timeout: 10s
retries: 5
depends_on:
- keycloak
scl-auto-alignment:
labels:
compas: true
image: "lfenergy/compas-scl-auto-alignment:0.5.1"
ports:
- "9092:8080"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
- JWT_VERIFY_CLIENT_ID=scl-auto-alignment
- JWT_GROUPS_PATH=resource_access/scl-auto-alignment/roles
- USERINFO_WHO_CLAIMNAME=name
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-auto-alignment/q/health/ready"]
interval: 15s
timeout: 10s
retries: 5
depends_on:
- keycloak
scl-validator:
labels:
compas: true
image: "lfenergy/compas-scl-validator:0.6.1"
ports:
- "9093:8080"
environment:
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
- JWT_VERIFY_CLIENT_ID=scl-validator
- JWT_GROUPS_PATH=resource_access/scl-validator/roles
- USERINFO_WHO_CLAIMNAME=name
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-validator/q/health/ready"]
interval: 15s
timeout: 10s
retries: 5
volumes:
- ./data/ocl:/data/ocl
- ./data/nsdoc:/data/nsdoc
depends_on:
- keycloak
open-scd:
labels:
compas: true
image: "lfenergy/compas-open-scd:v0.36.0.1"
depends_on:
- scl-data-service
- cim-mapping
- scl-auto-alignment
- scl-validator
reverse-proxy:
labels:
compas: true
build:
context: ./reverse-proxy
args:
COMPAS_HOSTNAME: ${COMPAS_HOSTNAME}
CONFIGURATION_LOCATION: ${CONFIGURATION_LOCATION}
BACKDOOR_PORT: ${BACKDOOR_PORT}
BACKDOOR_PATH: ${BACKDOOR_PATH}
ports:
- "80:80"
depends_on:
- keycloak
- scl-data-service
- cim-mapping
- scl-auto-alignment
- scl-validator
- open-scd
volumes:
postgresql-data-volume: