Simple Wiki

Usage
(Note: The root user is created on the first run or whenever the user with id <root> does not exist in the DB, therefore changing it's username or password in the config won't update it after it is created.)
Config
Example config.json:
{
"Server": {
"ListenAddress": ":8080",
"CookieSecret": "my-super-secret-cookie-secret",
"CSRFSecret": "my-csrf-token-secret",
"DevelopmentMode": true,
"IPRateLimiter": {
"ReqPerSecond": 10,
"ReqBurst": 10
}
},
"DB": {
"ConnectionURI": "postgres://test:test@localhost:5432/test?sslmode=disable",
"MaxOpenConns": 25,
"MaxIdleConns": 1
},
"RootUser": {
"Username": "root",
"Password": "my-complex-password"
},
"Logging": {
"Level": "debug"
}
}
You can override each level of the config file using environment variables, to do so you must prefix the variable name with CONF__ and format the value as JSON. Each double-underscore __ goes one level deeper in the JSON.
example:
export CONF__Server__ListenAddress='":8080"' #note the "" for JSON string
export CONF__Server__DevelopmentMode='true' #this is a JSON bool, no need for ""
export CONF__DB__ConnectionURI='"postgres://wiki:my-db-password@localhost:5432/wiki?sslmode=disable"'
Docker Support
The image is available on Docker Hub as seanyahn/simplewiki.
To quickly get it up and running using docker you can use the docker-compose.yml.
License
MIT