configuration.md 3.31 KB
Newer Older
les's avatar
doc  
les committed
1
2
---
title: Configuration
les's avatar
les committed
3
permalink: /install/config
les's avatar
les committed
4
5
nav_order: 6
parent: Install
les's avatar
doc  
les committed
6
7
---

les's avatar
les committed
8
## Configuration
les's avatar
doc  
les committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{: .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"`

les's avatar
minor    
les committed
24
![title](../assets/title.png)
les's avatar
doc  
les committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

- ### 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
les's avatar
les committed
44
DB configuration, look [here](https://sequelize.org/master/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor) for options.
les's avatar
doc  
les committed
45
46
47
48
49
50
51
52
53
54
55
```json
  "db": {
    "dialect": "sqlite",
    "storage": "/tmp/db.sqlite"
  }
```
- ### Upload path
Where to save images
`"upload_path": "./uploads"`

- ### SMTP
les's avatar
les committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
SMTP configuration.
Gancio should send emails at following events:
- the admin should receive emails of anon event (if enabled) to confirm them.
- the admin should receive emails of registration request (if enabled) to confirm them.
- an user should receive an email of registration requested.
- an user should receive an email of confirmed registration.
- an user should receive a confirmation email when subscribed directly by admin.

```json
"smtp": {
    "auth": {
      "user": "",
      "pass": ""
    },
    "secure": true,
    "host": ""
  }
```

- ### Admin_email
Email of administrator. Note that email from gancio comes from this email and that
the SMTP configuration above should allow to use this address as from.

les's avatar
les committed
79

les's avatar
doc  
les committed
80
- ### Favicon
les's avatar
les committed
81
82
You could specify another favicon. This is also used as logo (top-left
corner):   
les's avatar
doc  
les committed
83
84
`"favicon": "./favicon.ico"`

les's avatar
les committed
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
- ### 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"
```  
les's avatar
les committed
103
Watch [here](https://framagit.org/les/gancio/tree/master/locales) for a
les's avatar
les committed
104
105
106
107
list of strings you can override.  
<small>:warning: Note that a restart is needed when you change
user_locale's content.</small>

les's avatar
doc  
les committed
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
- ### 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": ""
  },
les's avatar
les committed
135
  "admin_email": "",
les's avatar
doc  
les committed
136
137
  "secret": "notsosecret"
}
les's avatar
les committed
138
```