-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
242 lines (230 loc) · 6.54 KB
/
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
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
# SPDX-FileCopyrightText: 2024 Christian Meeßen (GFZ) <[email protected]>
# SPDX-FileCopyrightText: 2024 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences
#
# SPDX-License-Identifier: Apache-2.0
# Use the same name as in main RSD compose file
name: rsd-plugin-example
services:
#----------------------------
# RSD PLUGIN 01 SERVICES
#----------------------------
plugin-01-fe:
build:
context: ./plugin-01/frontend
dockerfile: Dockerfile
image: rsd/plugin-01-fe:0.0.1
environment:
- API_ROOT_PATH
# NOTE! expose is required by nginx proxy_pass
expose:
- 80
networks:
- net
plugin-01-be:
build:
context: ./plugin-01/backend
dockerfile: Dockerfile
image: rsd/plugin-01-be:0.0.1
environment:
- API_ROOT_PATH
expose:
- 8081
# - 5678:5678
networks:
- net
volumes:
- ./plugin-01/backend:/app
# Uncomment to allow connecting using a debugger in your IDE
# entrypoint: "pipenv run python -Xfrozen_modules=off -m debugpy --listen 0.0.0.0:5678 main.py"
# --------------------------------------------------
# RSD CORE SERVICES
# --------------------------------------------------
database:
# Official rsd-saas image. You can change to local image for testing purposes
image: ghcr.io/research-software-directory/rsd-saas/database:v2.23.0
# ports:
# enable connection from outside (development mode)
# - "5432:5432"
expose:
- 5432
environment:
# it uses values from .env file
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_AUTHENTICATOR_PASSWORD
volumes:
# persist data in named docker volume
# to remove use: docker compose down --volumes
# to inspect use: docker volume ls
- pgdb:/var/lib/postgresql/data/
networks:
- net
backend:
# Official rsd-saas image. You can change to local image for testing purposes
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.23.0
expose:
- 3500
environment:
# it needs to be here to use values from .env file
- PGRST_DB_URI=postgres://rsd_authenticator:${POSTGRES_AUTHENTICATOR_PASSWORD}@${POSTGRES_DB_HOST}:${POSTGRES_DB_HOST_PORT}/${POSTGRES_DB}
- PGRST_DB_ANON_ROLE
- PGRST_DB_SCHEMA
- PGRST_SERVER_PORT
- PGRST_JWT_SECRET
depends_on:
- database
networks:
- net
auth:
# Official rsd-saas image. You can change to local image for testing purposes
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.23.0
# ports:
# - 5005:5005
expose:
- 7000
environment:
# it uses values from .env file
- RSD_ENVIRONMENT
- POSTGREST_URL
- RSD_AUTH_COUPLE_PROVIDERS
- RSD_AUTH_PROVIDERS
- RSD_AUTH_USER_MAIL_WHITELIST
- SURFCONEXT_CLIENT_ID
- SURFCONEXT_REDIRECT
- SURFCONEXT_WELL_KNOWN_URL
- SURFCONEXT_SCOPES
- HELMHOLTZID_CLIENT_ID
- HELMHOLTZID_REDIRECT
- HELMHOLTZID_WELL_KNOWN_URL
- HELMHOLTZID_SCOPES
- HELMHOLTZID_USE_ALLOW_LIST
- HELMHOLTZID_ALLOW_LIST
- ORCID_CLIENT_ID
- ORCID_REDIRECT
- ORCID_REDIRECT_COUPLE
- ORCID_WELL_KNOWN_URL
- ORCID_SCOPES
- AZURE_CLIENT_ID
- AZURE_REDIRECT
- AZURE_WELL_KNOWN_URL
- AZURE_SCOPES
- AZURE_ORGANISATION
- HELMHOLTZID_ALLOW_EXTERNAL_USERS
- AUTH_SURFCONEXT_CLIENT_SECRET
- AUTH_HELMHOLTZID_CLIENT_SECRET
- AUTH_ORCID_CLIENT_SECRET
- AUTH_AZURE_CLIENT_SECRET
- PGRST_JWT_SECRET
depends_on:
- database
- backend
networks:
- net
entrypoint:
[
"java",
"-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n",
"-cp", "auth.jar",
"nl.esciencecenter.rsd.authentication.Main"
]
frontend:
# Official rsd-saas image. You can change to local image for testing purposes
image: ghcr.io/research-software-directory/rsd-saas/frontend:v2.23.0
environment:
# it uses values from .env file
- POSTGREST_URL
- PGRST_JWT_SECRET
- RSD_AUTH_URL
- RSD_AUTH_PROVIDERS
- RSD_AUTH_COUPLE_PROVIDERS
- RSD_REVERSE_PROXY_URL
- MATOMO_URL
- MATOMO_ID
- SURFCONEXT_CLIENT_ID
- SURFCONEXT_REDIRECT
- SURFCONEXT_WELL_KNOWN_URL
- SURFCONEXT_SCOPES
- SURFCONEXT_RESPONSE_MODE
- HELMHOLTZID_CLIENT_ID
- HELMHOLTZID_REDIRECT
- HELMHOLTZID_WELL_KNOWN_URL
- HELMHOLTZID_SCOPES
- HELMHOLTZID_RESPONSE_MODE
- ORCID_CLIENT_ID
- ORCID_REDIRECT
- ORCID_REDIRECT_COUPLE
- ORCID_WELL_KNOWN_URL
- ORCID_SCOPES
- AZURE_CLIENT_ID
- AZURE_REDIRECT
- AZURE_WELL_KNOWN_URL
- AZURE_SCOPES
- AZURE_LOGIN_PROMPT
- AZURE_DISPLAY_NAME
- AZURE_DESCRIPTION_HTML
- CROSSREF_CONTACT_EMAIL
expose:
- 3000
depends_on:
- database
- backend
- auth
volumes:
# to enable plugin extend settings.json
- ./rsd-settings:/app/public/data
# custom rsd settings
# - ./rsd-settings/styles:/app/public/styles
# - ./rsd-settings/images:/app/public/images
networks:
- net
documentation:
# Official rsd-saas image. You can change to local image for testing purposes
image: ghcr.io/research-software-directory/rsd-saas/documentation:v2.23.0
expose:
- 80
networks:
- net
#-----------------------------------------------------
# NGINX router/reverse proxy combining RSD core and plugins
#-----------------------------------------------------
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
image: rsd/plugins-nginx:0.0.1
ports:
- "80:80"
- "443:443"
depends_on:
- plugin-01-be
- plugin-01-fe
- database
- backend
- auth
- frontend
- documentation
networks:
- net
volumes:
- lets-encrypt:/etc/letsencrypt
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
#--------------------------------------------------
# DEBUG service: ubuntu with curl (see debug folder)
#--------------------------------------------------
debug:
build:
context: ./debug
dockerfile: Dockerfile
image: rsd/plugins-debug:0.0.1
command: ["sleep","infinity"]
networks:
- net
networks:
net:
# external: true
# named volumes can be managed easier using docker compose
# volume should have name rsd-as-a-service_pgdb
volumes:
lets-encrypt:
pgdb: