-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-config.edn
301 lines (301 loc) · 17.3 KB
/
example-config.edn
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
{
;; DROID server configuration parameters
;; =====================================
;;
;; Parameter name :log-level
;; Location: main configuration block
;; Required: yes
;; Notes: Must be set to one of `:debug`, `:info`, `:warn`, `:error`, `:critical`. The higher the
;; level, the fewer messages will be written to the log.
:log-level :info
;;
;; Parameter name :log-file
;; Location: main configuration block
;; Required: no; if unspecified or set to nil, DROID's log is written to STDERR.
;; Notes: The filename (relative to DROID's root directory) where the log will be written to (e.g,
;; "doid.log", "log/droid.log", etc.)
:log-file nil
;;
;; Parameter name :insecure-site
;; Location: main configuration block
;; Required: no; defaults to false
;; Notes: If set to false, `https:` protocol will be used, otherwise DROID will use `http:`.
:insecure-site false
;;
;; Parameter name :server-port
;; Location: main configuration block
;; Required: yes
;; Notes: The port that the server will listen on.
:server-port 8090
;;
;; Parameter name :site-admin-github-ids
;; Location: main configuration block
;; Required: no; defaults to no site administrators
;; Notes: GitHub userids that are considered as DROID site administrators and are to be granted
;; special permissions. Format: #{"user1", "user2", ...}
:site-admin-github-ids #{}
;;
;; Parameter name :cgi-timeout
;; Location: main configuration block
;; Required: no; default: 10000 milliseconds
;; Notes: The maximum number of milliseconds that a CGI script is allowed to run
:cgi-timeout 10000
;;
;; Parameter name :docker-config
;; Location: main configuration block
;; Required: yes
;; Fallback docker configuration block to be used for projects that do not include their own.
:docker-config {
;;
;; Parameter name: :disabled?
;; Location: fallback docker configuration block
;; Required: no; defaults to true
;; Notes: If set to true, projects that do not define their own docker
;; configuration will not use docker containers. Projects that _do_ specify
;; their own docker configuration, with `:disabled?` set to `false` in their
;; project-specific docker configuration (see below), will still use docker
;; containers.
:disabled? true
;;
;; Parameter name :image
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: The docker image to use when creating containers. Individual branches of
;; a project may override this by including a Dockerfile at the root of
;; their workspace directory.
:image "debian:buster"
;;
;; Parameter name :workspace-dir
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: The path to the root workspace directory within a container.
:workspace-dir "/workspace/"
;;
;; Parameter name :temp-dir
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: The path to the temporary directory within a container.
:temp-dir "/tmp/droid/"
;;
;; Parameter name :default-working-dir
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: The directory relative to which DROID commands should be run by default
;; within the container, if not otherwise specified.
:default-working-dir "/workspace/"
;;
;; Parameter name :extra-volumes
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: Other volumes that should be mounting when running the container (e.g., the postgresql
;; socket connection location).
:extra-volumes []
;;
;; Parameter name :shell-command
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: The program name of the shell to be used when running commands.
:shell-command "sh"
;;
;; Parameter name :env
;; Location: fallback docker configuration block
;; Required: only when fallback docker configuration is enabled (see above)
;; Notes: Extra environment variables passed to containers when running commands.
;; Format: {"ENV_VAR1" "env_var1_value",
;; "ENV_VAR2" "env_var2_value", ...}
:env {}}
;;
;; Parameter name :remove-containers-on-shutdown
;; Location: main configuration block
;; Required: no, defaults to false
;; Notes: Set to true if you would like to remove docker containers automatically at server shut
;; down. Note that even without this flag set, docker containers will be *paused* on server
;; shutdown.
:remove-containers-on-shutdown false
;;
;; Parameter name :local-mode
;; Location: main configuration block
;; Required: no; defaults to false
;; Notes: If set to true, DROID will authenticate to GitHub using a personal access token read from
;; the environment variable PERSONAL_ACCESS_TOKEN, which must be set.
:local-mode false
;;
;; Parameter name :github-app-id
;; Location: main configuration block
;; Required: only when not running in local mode (see above)
;; Notes: The GitHub App ID to use for authentication to GitHub on behalf of a logged in user when
;; not running in local mode.
:github-app-id 55555
;;
;; Parameter name :github-user-name
;; Location: main configuration block
;; Required: yes
;; Notes: The name of the GitHub user that commits will be attributed to on github.com.
:github-user-name "droid.ontodev.com"
;;
;; Parameter name :github-user-email
;; Location: main configuration block
;; Required: yes
;; Notes: The email of the GitHub user that commits will be attributed to on github.com.
:github-user-email "droid@droid.ontodev.com"
;;
;; Parameter name :pem-file
;; Location: main configuration block
;; Required: only when not running in local mode (see above)
;; Notes: The file, relative to DROID's root directory, containing the private key to use, in
;; conjunction with the GitHub App ID, for authenticating to GitHub on behalf of a logged in
;; user when not running in local mode.
:pem-file "FILE.pem"
;;
;; Parameter name :push-with-installation-token
;; Location: main configuration block
;; Required: no; defaults to false
;; Notes: If set to true, pushes to GitHub will use an installation token provided through the
;; GitHub App for the repository. Otherwise pushes will use the user's user access token
;; (which is also authenticated via the GitHub App). Note that if :local-mode is set to
;; true, the personal access token will be used in lieu of the installation token.
:push-with-installation-token false
;;
;; Parameter name :html-body-colors
;; Location: main configuration block
;; Required: no; defaults to "bg-white" (the Bootstrap default))
;; Notes: A valid [bootstrap background colour](https://getbootstrap.com/docs/4.4/utilities/colors/#background-color)
;; to use when rendering DROID's pages.
:html-body-colors "bg-white"
;;
;; Parameter name :projects
;; Location: main configuration block
;; Required: yes
;; Notes: A list of individual project configuration blocks, indexed by project nickname.
:projects {"project1" {
;;
;; Parameter name :project-title
;; Location: individual project configuration block
;; Required: yes
;; Notes: This is displayed on the browser's window frame and in the banner
;; whenever the browser is on one of the project's pages.
:project-title "Project Title"
;;
;; Parameter name :project-welcome (currently unused)
;; Location: individual project configuration block
;; Required: no.
;; Notes: A welcome message for the project.
:project-welcome "welcome message"
;;
;; Parameter name :project-description
;; Location: individual project configuration block
;; Required: yes
;; Notes: Displayed below the banner on the main project page..
:project-description "Project description"
;;
;; Parameter name :github-coordinates
;; Location: individual project configuration block
;; Required: yes
;; Notes: Location of the project in github, i.e.,
;; https://github.com/GITHUB_COORDINATES, where GITHUB_COORDINATES
;; is of the form <org or owner>/<repository name>
:github-coordinates "github-org/repository-1"
;;
;; Parameter name :makefile-path
;; Location: individual project configuration block
;; Required: no; when unspecified or nil, defaults to "Makefile"
;; Notes: The complete path of the makefile for which all workflow actions,
;; views, and scripts will be assumed by DROID to be relative to.
;; Example: "src/ontology/custom.Makefile"
:makefile-path nil
;;
;; Parameter name :env
;; Location: individual project configuration block
;; Required: no; defaults to no environment variables
;; Notes: Environment variables to use with all commands that run in this
;; project. Format: {"ENV_VAR1" "env_var1_value",
;; "ENV_VAR2" "env_var2_value", ...}
:env {}
;;
;; Parameter name :docker-config
;; Location: individual project configuration block
;; Required: no
;; Notes: If not included in a individual project configuration block,
;; the fallback docker configuration (see above) will be applied to
;; the given project.
:docker-config {
;;
;; Parameter name :disabled?
;; Location: project-level docker configuration block
;; Required: no; defaults to true
;; Notes: If set to true, docker containers won't be used
;; for the given project.
:disabled? true
;;
;; Parameter name :image
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: The docker image to use when creating containers.
;; Individual branches of a project may override this
;; by including a Dockerfile at the root of their
;; workspace directory.
:image "debian:buster"
;;
;; Parameter name :workspace-dir
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: The path to the root workspace directory within a
;; container.
:workspace-dir "/workspace/"
;;
;; Parameter name :temp-dir
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: The path to the temporary directory within a
;; container.
:temp-dir "/tmp/droid/"
;;
;; Parameter name :default-working-dir
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: The default directory relative to which DROID
;; commands should be run by default within the
;; container.
:default-working-dir "/workspace/"
;;
;; Parameter name :extra-volumes
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: Other volumes that should be mounting when running the container
;; (e.g., the postgresql socket connection location).
:extra-volumes []
;;
;; Parameter name :shell-command
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: The program name of the shell to be used when
;; running commands in a docker container.
:shell-command "sh"
;;
;; Parameter name :env
;; Location: project-specific docker configuration block
;; Required: only when project-specific docker configuration
;; is enabled (see above)
;; Notes: Extra environment variables passed to containers
;; when running commands.
;; Format: {"ENV_VAR1" "env_var1_value",
;; "ENV_VAR2" "env_var2_value", ...}
:env {}}}
"project2" {:project-title "PROJECT2"
:project-welcome "welcome message"
:project-description "description"
:github-coordinates "github-org/repository-2"
:docker-config {:disabled? true
:image "debian:buster"
:workspace-dir "/workspace/"
:temp-dir "/tmp/droid/"
:default-working-dir "/workspace/"
:extra-volumes []
:shell-command "sh"
:env {}}}}}