2019-07-25 11:01:08 +02:00
|
|
|
---
|
|
|
|
title: Configuration
|
2021-06-04 15:52:35 +02:00
|
|
|
permalink: /install/config
|
2021-06-04 15:34:40 +02:00
|
|
|
nav_order: 6
|
|
|
|
parent: Install
|
2019-07-25 11:01:08 +02:00
|
|
|
---
|
|
|
|
|
2019-12-04 01:12:59 +01:00
|
|
|
## Configuration
|
2019-07-25 11:01:08 +02:00
|
|
|
{: .no_toc }
|
2021-12-09 09:32:43 +01:00
|
|
|
`gancio` configuration is done during installation process but you can change it editing the configuration file.
|
2021-06-20 23:10:20 +02:00
|
|
|
The configuration file shoud be a `.json` or a `.js` file and could be specified using the `--config` flag.
|
2019-07-25 11:01:08 +02:00
|
|
|
|
|
|
|
- <small>eg. `gancio start --config ./config.json`</small>
|
|
|
|
- <small>eg. `pm2 start gancio start -- --config ~/config.json`</small>
|
|
|
|
|
|
|
|
1. TOC
|
|
|
|
{:toc}
|
|
|
|
|
2022-12-11 01:01:04 +01:00
|
|
|
### Server
|
2021-10-25 11:09:10 +02:00
|
|
|
This probably support unix socket too
|
2019-07-25 11:01:08 +02:00
|
|
|
|
|
|
|
```json
|
|
|
|
"server": {
|
|
|
|
"host": "localhost",
|
|
|
|
"port": 13120
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-12-11 01:01:04 +01:00
|
|
|
### Database
|
2022-02-20 22:18:47 +01:00
|
|
|
DB configuration, look [here](https://sequelize.org/v6/class/src/sequelize.js~Sequelize.html#instance-constructor-constructor) for options.
|
2019-07-25 11:01:08 +02:00
|
|
|
```json
|
|
|
|
"db": {
|
|
|
|
"dialect": "sqlite",
|
|
|
|
"storage": "/tmp/db.sqlite"
|
|
|
|
}
|
|
|
|
```
|
2022-12-11 01:01:04 +01:00
|
|
|
### Upload path
|
|
|
|
Where to save images
|
2019-07-25 11:01:08 +02:00
|
|
|
`"upload_path": "./uploads"`
|
|
|
|
|
2022-12-11 01:01:04 +01:00
|
|
|
### Plugins path
|
|
|
|
Where to search for [plugins](/usage/plugins)
|
|
|
|
`"plugins_path": "./plugins"`
|
|
|
|
|
|
|
|
### User locale
|
2019-07-26 23:53:02 +02:00
|
|
|
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.
|
2021-11-09 13:06:29 +01:00
|
|
|
For example, let's say you want to modify the text shown during registration:
|
|
|
|
`mkdir /opt/gancio/user_locale`
|
|
|
|
|
|
|
|
put something like this in `/opt/gancio/user_locale/en.json` to override the registration description in
|
2019-07-26 23:53:02 +02:00
|
|
|
english:
|
2021-11-09 13:06:29 +01:00
|
|
|
```json
|
|
|
|
{
|
2023-09-30 13:03:49 +02:00
|
|
|
"register": {
|
2021-11-09 13:06:29 +01:00
|
|
|
"description": "My new registration page description"
|
|
|
|
}
|
2019-07-26 23:53:02 +02:00
|
|
|
}
|
|
|
|
```
|
2021-11-09 13:06:29 +01:00
|
|
|
and then point the `user_locale` configuration to that directory (in your `config.json`):
|
2019-07-26 23:53:02 +02:00
|
|
|
```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
|
2021-10-25 11:09:10 +02:00
|
|
|
list of strings you can override.
|
2019-07-25 11:01:08 +02:00
|
|
|
|
2021-10-25 11:09:10 +02:00
|
|
|
> warning "Restart needed"
|
|
|
|
> Note that a restart is needed when you change user_locale's content.
|
2023-03-16 17:29:48 +01:00
|
|
|
|
|
|
|
### Proxy
|
|
|
|
Proxy outward request from gancio.
|
|
|
|
Look [here](https://www.npmjs.com/package/https-proxy-agent) for options.
|
|
|
|
Note: `hostname` option takes precedence over `host`.
|
|
|
|
|
|
|
|
```json
|
|
|
|
"proxy": {
|
|
|
|
"protocol": "http:",
|
|
|
|
"hostname": "",
|
|
|
|
"host": "127.0.0.1",
|
|
|
|
"port": "8118",
|
|
|
|
"auth": {
|
|
|
|
"username": "user",
|
|
|
|
"password": "password"
|
|
|
|
},
|
|
|
|
"headers": {
|
|
|
|
"X-Proxy-Header": "example"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|