Skip to content

Commit 87ef080

Browse files
AdministratorNGPixel
Administrator
authored andcommittedFeb 22, 2021
docs: update install/config
1 parent ac3c18b commit 87ef080

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed
 

‎install/config.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
title: Configuration
33
description: Detailed configuration options for Wiki.js
44
published: true
5-
date: 2020-08-16T00:28:21.594Z
5+
date: 2021-02-22T18:32:32.630Z
66
tags:
77
editor: markdown
8+
dateCreated: 2020-01-12T21:12:06.291Z
89
---
910

1011
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
332333
dataPath: /path/to/directory
333334
```
334335

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+
335369
# Sample Config File
336370

337371
The latest version of the complete sample config file can be found on [GitHub](https://github.com/Requarks/wiki/blob/master/config.sample.yml).

0 commit comments

Comments
 (0)