-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcompose.base.yml
More file actions
246 lines (235 loc) · 9.63 KB
/
Copy pathcompose.base.yml
File metadata and controls
246 lines (235 loc) · 9.63 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
name: openuem
services:
db:
container_name: openuem-db
image: postgres:17
restart: always
command: -p $DATABASE_PORT
environment:
- POSTGRES_USER=${DATABASE_USER:?DATABASE_USER env variable needs to be set!}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD:?DATABASE_PASSWORD env variable needs to be set!}
- POSTGRES_DB=${DATABASE_DB_NAME:?DATABASE_DB_NAME env variable needs to be set!}
- POSTGRES_PORT=${DATABASE_PORT:?DATABASE_PORT env variable needs to be set!}
expose:
- $DATABASE_PORT
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $DATABASE_USER -p $DATABASE_PORT" ]
interval: 1s
timeout: 5s
retries: 10
networks:
- openuem
openuem-certs:
container_name: openuem-certs
image: openuem/openuem-cert-manager
entrypoint:
- /bin/configure.sh
environment:
- ORGNAME=${OPENUEM_ORGNAME?OPENUEM_ORGNAME env variable needs to be set!}
- ORGPROVINCE=${OPENUEM_ORGPROVINCE?OPENUEM_ORGPROVINCE env variable needs to be set!}
- ORGLOCALITY=${OPENUEM_ORGLOCALITY?OPENUEM_ORGLOCALITY env variable needs to be set!}
- ORGADDRESS=${OPENUEM_ORGADDRESS?OPENUEM_ORGADDRESS env variable needs to be set!}
- COUNTRY=${OPENUEM_ORGCOUNTRY?OPENUEM_ORGCOUNTRY env variable needs to be set!}
- DOMAIN=${OPENUEM_DOMAIN:?OPENUEM_DOMAIN env variable needs to be set!}
- OCSP=${OCSP_URL:?OCSP_URL env variable needs to be set!}
- DATABASE_URL=${OPENUEM_DATABASE_URL:?OPENUEM_DATABASE_URL env variable needs to be set!}
- SERVER_NAME=${CONSOLE_HOST:?CONSOLE_HOST env variable needs to be set!}
- REVERSE_PROXY_SERVER=${REVERSE_PROXY_HOST}
# - NATS_DEBUG=${NATS_DEBUG}
- NATS_SERVER=${NATS_HOST:?NATS_HOST env variable needs to be set!}
- NATS_PORT=${NATS_PORT:?NATS_PORT env variable needs to be set!}
# - NATS_WEBSOCKETPORT=${NATS_WEBSOCKETPORT}
volumes:
- "./certificates:/certificates:z"
- "./nats:/etc/nats:z"
depends_on:
db:
condition: service_healthy
networks:
- openuem
ocsp-responder:
container_name: openuem-ocsp-responder
image: openuem/openuem-ocsp-responder
pull_policy: always
command: "start"
restart: always
environment:
- OCSP_PORT=${OCSP_PORT:?OCSP_PORT env variable needs to be set!}
- DATABASE_URL=${OPENUEM_DATABASE_URL:?OPENUEM_DATABASE_URL env variable needs to be set!}
ports:
- $OCSP_PORT:$OCSP_PORT
volumes:
- "./certificates/ocsp/ocsp.cer:/usr/bin/certificates/ocsp.cer"
- "./certificates/ocsp/ocsp.key:/usr/bin/certificates/ocsp.key"
- "./certificates/ca/ca.cer:/usr/bin/certificates/ca.cer"
# while the docker image contains a HEALTHCHECK definition, podman seems to be ignoring this under certain
# circumstances. To allow podman to run this stack as well, the healthcheck definitions are duplicated and set below
# as well. See https://github.com/containers/podman/issues/18904 for more details
healthcheck:
test: curl -f http://localhost:${OCSP_PORT}/health || exit 1
interval: 30s
timeout: 5s
start_period: 30s
retries: 3
depends_on:
openuem-certs:
condition: service_completed_successfully
db:
condition: service_healthy
networks:
openuem:
aliases:
- ocsp.openuem.example
nats-server:
container_name: openuem-nats-server
image: nats:latest
environment:
- NATS_SERVER=${NATS_HOST:?NATS_HOST env variable needs to be set!}
- NATS_PORT=${NATS_PORT:?NATS_PORT env variable needs to be set!}
- ORGNAME=${OPENUEM_ORGNAME?OPENUEM_ORGNAME env variable needs to be set!}
- ORGPROVINCE=${OPENUEM_ORGPROVINCE?OPENUEM_ORGPROVINCE env variable needs to be set!}
- ORGLOCALITY=${OPENUEM_ORGLOCALITY?OPENUEM_ORGLOCALITY env variable needs to be set!}
- ORGADDRESS=${OPENUEM_ORGADDRESS?OPENUEM_ORGADDRESS env variable needs to be set!}
- COUNTRY=${OPENUEM_ORGCOUNTRY?OPENUEM_ORGCOUNTRY env variable needs to be set!}
ports:
- $NATS_PORT:${NATS_PORT:?NATS_PORT env variable needs to be set!}
# - $NATS_WEBSOCKETPORT:${NATS_WEBSOCKETPORT}
restart: always
command: "-c /etc/nats.cfg"
volumes:
- "./certificates/nats/nats.cer:/etc/nats-certificates/nats.cer:z"
- "./certificates/nats/nats.key:/etc/nats-certificates/nats.key:z"
- "./certificates/ca/ca.cer:/etc/nats-certificates/ca.cer:z"
- "./nats/nats.cfg:/etc/nats.cfg:z"
- jetstream:/var/lib/jetstream/data
depends_on:
openuem-certs:
condition: service_completed_successfully
db:
condition: service_healthy
ocsp-responder:
condition: service_healthy
networks:
openuem:
aliases:
- nats.openuem.example
notification-worker:
container_name: openuem-notification-worker
image: openuem/openuem-worker
pull_policy: always
command: "notifications start"
restart: always
environment:
- NATS_SERVERS=${OPENUEM_NATS_SERVERS:?OPENUEM_NATS_SERVERS env variable needs to be set!}
- DATABASE_URL=${OPENUEM_DATABASE_URL:?OPENUEM_DATABASE_URL env variable needs to be set!}
volumes:
- "./certificates/notification-worker/worker.cer:/tmp/certificates/worker.cer:z"
- "./certificates/notification-worker/worker.key:/tmp/certificates/worker.key:z"
- "./certificates/ca/ca.cer:/tmp/certificates/ca.cer:z"
depends_on:
openuem-certs:
condition: service_completed_successfully
db:
condition: service_healthy
nats-server:
condition: service_started
networks:
- openuem
cert-manager-worker:
container_name: openuem-cert-manager-worker
image: openuem/openuem-worker
pull_policy: always
command: "cert-manager start"
restart: always
environment:
- OCSP=${OCSP_URL:?OCSP_URL env variable needs to be set!}
- NATS_SERVERS=${OPENUEM_NATS_SERVERS:?OPENUEM_NATS_SERVERS env variable needs to be set!}
- DATABASE_URL=${OPENUEM_DATABASE_URL:?OPENUEM_DATABASE_URL env variable needs to be set!}
volumes:
- "./certificates/cert-manager-worker/worker.cer:/tmp/certificates/worker.cer:z"
- "./certificates/cert-manager-worker/worker.key:/tmp/certificates/worker.key:z"
- "./certificates/ca/ca.cer:/tmp/certificates/ca.cer:z"
- "./certificates/ca/ca.key:/tmp/certificates/ca.key:z"
depends_on:
openuem-certs:
condition: service_completed_successfully
db:
condition: service_healthy
nats-server:
condition: service_started
networks:
- openuem
agents-worker:
container_name: openuem-agents-worker
image: openuem/openuem-worker
pull_policy: always
command: "agents start"
restart: always
environment:
- NATS_SERVERS=${OPENUEM_NATS_SERVERS:?OPENUEM_NATS_SERVERS env variable needs to be set!}
- DATABASE_URL=${OPENUEM_DATABASE_URL:?OPENUEM_DATABASE_URL env variable needs to be set!}
volumes:
- "./certificates/agents-worker/worker.cer:/tmp/certificates/worker.cer:z"
- "./certificates/agents-worker/worker.key:/tmp/certificates/worker.key:z"
- "./certificates/ca/ca.cer:/tmp/certificates/ca.cer:z"
depends_on:
openuem-certs:
condition: service_completed_successfully
db:
condition: service_healthy
nats-server:
condition: service_started
networks:
- openuem
console:
container_name: openuem-console
image: openuem/openuem-console
restart: always
pull_policy: always
command: "start"
environment:
- NATS_SERVERS=${OPENUEM_NATS_SERVERS:?OPENUEM_NATS_SERVERS env variable needs to be set!}
- DATABASE_URL=${OPENUEM_DATABASE_URL:?OPENUEM_DATABASE_URL env variable needs to be set!}
- JWT_KEY=${CONSOLE_JWT_KEY:?CONSOLE_JWT_KEY env variable needs to be set!}
- SERVER_NAME=${CONSOLE_HOST:?CONSOLE_HOST env variable needs to be set!}
- CONSOLE_PORT=${CONSOLE_PORT:?CONSOLE_PORT env variable needs to be set!}
- AUTH_PORT=${CONSOLE_AUTH_PORT:?CONSOLE_AUTH_PORT env variable needs to be set!}
- DOMAIN=${OPENUEM_DOMAIN:?OPENUEM_DOMAIN env variable needs to be set!}
- ORGNAME=${OPENUEM_ORGNAME?OPENUEM_ORGNAME env variable needs to be set!}
- ORGPROVINCE=${OPENUEM_ORGPROVINCE?OPENUEM_ORGPROVINCE env variable needs to be set!}
- ORGLOCALITY=${OPENUEM_ORGLOCALITY?OPENUEM_ORGLOCALITY env variable needs to be set!}
- ORGADDRESS=${OPENUEM_ORGADDRESS?OPENUEM_ORGADDRESS env variable needs to be set!}
- COUNTRY=${OPENUEM_ORGCOUNTRY:?OPENUEM_ORGCOUNTRY env variable needs to be set!}
- REVERSE_PROXY_AUTH_PORT=${REVERSE_PROXY_AUTH_PORT}
- REVERSE_PROXY_SERVER=${REVERSE_PROXY_HOST}
- RE_ENABLE_CERTIFICATES_AUTH=${CONSOLE_RE_ENABLE_CERTIFICATES_AUTH}
- RE_ENABLE_PASSWD_AUTH=${CONSOLE_RE_ENABLE_PASSWD_AUTH}
- RESET_OPENUEM_USER=${CONSOLE_RESET_OPENUEM_USER}
ports:
- $CONSOLE_PORT:$CONSOLE_PORT
- $CONSOLE_AUTH_PORT:$CONSOLE_AUTH_PORT
volumes:
- "./certificates/console/console.cer:/bin/certificates/console.cer:z"
- "./certificates/console/console.key:/bin/certificates/console.key:z"
- "./certificates/console/sftp.key:/bin/certificates/sftp.key:z"
- "./certificates/ca/ca.cer:/bin/certificates/ca.cer:z"
depends_on:
openuem-certs:
condition: service_completed_successfully
db:
condition: service_healthy
nats-server:
condition: service_started
networks:
openuem:
aliases:
- console.openuem.example
networks:
openuem:
volumes:
pgdata:
driver: local
jetstream:
driver: local