2019-07-25 11:01:08 +02:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
title: Configuration
|
|
|
|
permalink: /config
|
|
|
|
nav_order: 3
|
|
|
|
---
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
{: .no_toc }
|
|
|
|
Main `gancio` configuration is done with a configuration file.
|
|
|
|
This shoud be a `.json` or a `.js` file and could be specified using the `--config` flag.
|
|
|
|
|
|
|
|
- <small>eg. `gancio start --config ./config.json`</small>
|
|
|
|
- <small>eg. `pm2 start gancio start -- --config ~/config.json`</small>
|
|
|
|
|
|
|
|
1. TOC
|
|
|
|
{:toc}
|
|
|
|
|
|
|
|
- ### Title
|
|
|
|
The title will be in rss feed, in html head and in emails:
|
|
|
|
|
|
|
|
`"title": "Gancio"`
|
|
|
|
|
|
|
|
![title](assets/title.png)
|
|
|
|
|
|
|
|
- ### Description
|
|
|
|
`"description": "a shared agenda for local communities"`
|
|
|
|
|
|
|
|
- ### BaseURL
|
|
|
|
URL where your site will be accessible (include http or https):
|
|
|
|
`"baseurl": "https://gancio.cisti.org"`
|
|
|
|
|
|
|
|
- ### Server
|
|
|
|
This probably support unix socket too :D
|
|
|
|
|
|
|
|
```json
|
|
|
|
"server": {
|
|
|
|
"host": "localhost",
|
|
|
|
"port": 13120
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
- ### Database
|
|
|
|
```json
|
|
|
|
"db": {
|
|
|
|
"dialect": "sqlite",
|
|
|
|
"storage": "/tmp/db.sqlite"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
- ### Upload path
|
|
|
|
Where to save images
|
|
|
|
`"upload_path": "./uploads"`
|
|
|
|
|
|
|
|
- ### SMTP
|
|
|
|
- ### Admin
|
|
|
|
- ### Favicon
|
2019-07-26 23:53:02 +02:00
|
|
|
You could specify another favicon. This is also used as logo (top-left
|
|
|
|
corner):
|
2019-07-25 11:01:08 +02:00
|
|
|
`"favicon": "./favicon.ico"`
|
|
|
|
|
2019-07-26 23:53:02 +02:00
|
|
|
- ### User locale
|
|
|
|
Probably you want to modify some text for your specific community, that's
|
|
|
|
why we thought the `user_locale` configuration: you can specify your version of
|
|
|
|
each string of **gancio** making a directory with your locales inside.
|
|
|
|
For example, let's say you want to modify the text inside the `/about`
|
|
|
|
page:
|
|
|
|
`mkdir /opt/gancio/user_locale`
|
|
|
|
put something like this in `/opt/gancio/user_locale/en.js` to override the about in
|
|
|
|
english:
|
|
|
|
```js
|
|
|
|
export default {
|
|
|
|
about: 'A new about'
|
|
|
|
}
|
|
|
|
```
|
|
|
|
and then point the `user_locale` configuration to that directory:
|
|
|
|
```json
|
|
|
|
"user_locale": "/opt/gancio/user_locale"
|
|
|
|
```
|
2019-08-31 22:14:37 +02:00
|
|
|
Watch [here](https://framagit.org/les/gancio/tree/master/locales) for a
|
2019-07-26 23:53:02 +02:00
|
|
|
list of strings you can override.
|
|
|
|
<small>:warning: Note that a restart is needed when you change
|
|
|
|
user_locale's content.</small>
|
|
|
|
|
2019-07-25 11:01:08 +02:00
|
|
|
- ### Secret
|
|
|
|
|
|
|
|
|
|
|
|
## Default settings
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"title": "Gancio",
|
|
|
|
"description": "A shared agenda for local communities",
|
|
|
|
"baseurl": "http://localhost:13120",
|
|
|
|
"server": {
|
|
|
|
"host": "0.0.0.0",
|
|
|
|
"port": 13120
|
|
|
|
},
|
|
|
|
"db": {
|
|
|
|
"dialect": "sqlite",
|
|
|
|
"storage": "/tmp/db.sqlite"
|
|
|
|
},
|
|
|
|
"upload_path": "./",
|
|
|
|
"favicon": "../dist/favicon.ico",
|
|
|
|
"smtp": {
|
|
|
|
"auth": {
|
|
|
|
"user": "",
|
|
|
|
"pass": ""
|
|
|
|
},
|
|
|
|
"secure": true,
|
|
|
|
"host": ""
|
|
|
|
},
|
|
|
|
"admin": "",
|
|
|
|
"secret": "notsosecret"
|
|
|
|
}
|
2019-07-26 23:53:02 +02:00
|
|
|
```
|