File tree 1 file changed +35
-1
lines changed
1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change 2
2
title : Configuration
3
3
description : Detailed configuration options for Wiki.js
4
4
published : true
5
- date : 2020-08-16T00:28:21.594Z
5
+ date : 2021-02-22T18:32:32.630Z
6
6
tags :
7
7
editor : markdown
8
+ dateCreated : 2020-01-12T21:12:06.291Z
8
9
---
9
10
10
11
A config file, named ` config.yml ` , must be located at the root of your Wiki.js installation.
@@ -332,6 +333,39 @@ Wiki.js needs a folder to write temporary data. By default, this path is `./data
332
333
dataPath: /path/to/directory
333
334
` ` `
334
335
336
+ # ENV Variables Interpolation
337
+
338
+ Any value can be replaced with `$(ENV_NAME)` to be interpolated at runtime with an environment variable.
339
+
340
+ # ## Example
341
+
342
+ Using the following `config.yml` example :
343
+ ` ` ` yaml
344
+ db:
345
+ type: $(DB_TYPE)
346
+ host: '$(DB_HOST)'
347
+ port: $(DB_PORT)
348
+ user: '$(DB_USER)'
349
+ pass: '$(DB_PASS)'
350
+ ` ` `
351
+ and the following environment variables :
352
+ - DB_TYPE=postgres
353
+ - DB_HOST=db.example.com
354
+ - DB_PORT=5432
355
+ - DB_USER=wiki
356
+ - DB_PASS=secret
357
+ {.grid-list}
358
+
359
+ would result in the following config being used at runtime :
360
+ ` ` ` yaml
361
+ db:
362
+ type: postgres
363
+ host: 'db.example.com'
364
+ port: 5432
365
+ user: 'wiki'
366
+ pass: 'secret'
367
+ ` ` `
368
+
335
369
# Sample Config File
336
370
337
371
The latest version of the complete sample config file can be found on [GitHub](https://github.com/Requarks/wiki/blob/master/config.sample.yml).
You can’t perform that action at this time.
0 commit comments