This commit is contained in:
lesion
2019-07-25 11:01:08 +02:00
parent 9a1ba7559b
commit c197ead49f
11 changed files with 102 additions and 134 deletions

1
docs/.gitignore vendored
View File

@@ -1,3 +1,2 @@
_site
.sass-cache
.jekyll-metadata

View File

@@ -17,8 +17,8 @@ title: Gancio
email: gancio@cisti.org
description: >- # this means to ignore newlines until "baseurl:"
A shared agenda for local communities
baseurl: "/gancio" # the subpath of your site, e.g. /blog
url: "https://prove.fugadalcontrollo.org" # the base hostname & protocol for your site, e.g. http://example.com
baseurl: "/" # the subpath of your site, e.g. /blog
url: "https://gancio.org" # the base hostname & protocol for your site, e.g. http://example.com
#twitter_username: jekyllrb
#github_username: jekyll

View File

@@ -13,7 +13,7 @@ nav_order: 5
{:toc}
## Basics
## Add user
## Enable registration
## Confirm registration
## Confirm event

BIN
docs/assets/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

90
docs/configuration.md Normal file
View File

@@ -0,0 +1,90 @@
---
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
You could specify another favicon
`"favicon": "./favicon.ico"`
- ### 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"
}
```

View File

@@ -6,7 +6,7 @@ nav_order: 6
---
# Contribute
{: .no_toc }
If you want to contribute, take a look at the [issues](https://git.lattuga.net/cisti/gancio/issues)
1. TOC
{:toc}

View File

@@ -12,7 +12,7 @@ permalink: /
A shared agenda for local communities.
{: .fs-6 }
[Get started now](/setup){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://demo.fugadalcontrollo.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 }
[Get started now](setup){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://demo.fugadalcontrollo.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 }
[Source](https://git.lattuga.net/cisti/gancio){: .btn .fs-5 }
<iframe width="800" height="500" sandbox="allow-same-origin allow-scripts" src="https://spacepub.space/videos/embed/9745bffc-e1e8-416d-9b08-fbc5e4c803b3?muted=1&title=0" frameborder="0" allowfullscreen></iframe>

View File

@@ -1,56 +0,0 @@
---
layout: default
title: Settings
permalink: /settings
nav_order: 3
---
# Settings
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>
Default configuration
{: .no_toc }
1. TOC
{:toc}
#### Title
####
## 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": {
"email": "",
"password": ""
},
"secret": "notsosecret"
}
```

View File

@@ -17,15 +17,6 @@ apt-get install -y nodejs postgresql
```bash
npm install --global gancio
```
3. Create database (optional)
```sql
apt install postgresql
sudo -u postgres psql
postgres=# create database gancio;
postgres=# create user gancio with encrypted password 'gancio';
postgres=# grant all privileges on database gancio to gancio;
```
1. Create a database (optional as you can use sqlite, but recommended)
```bash
sudo -u postgres psql
@@ -43,14 +34,13 @@ su gancio
1. Test & launch interactive setup
```bash
gancio --help
gancio setup
gancio setup --config config.json
```
1. Start
```bash
gancio --help
gancio setup
gancio start
gancio start --config config.json
```
1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup.
@@ -61,5 +51,5 @@ If you don't use the [docker way](/setup/docker), in production you should use s
```bash
sudo npm install --global pm2
pm2 gancio start
pm2 gancio start --config config.json
```

View File

@@ -1,55 +0,0 @@
---
layout: default
title: Classic
permalink: /setup/classic
parent: Setup
---
## Classic setup
1. Install Node.js and postgreSQL
```bash
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs postgresql
```
<small>[source](https://github.com/nodesource/distributions/blob/master/README.md)</small>
1. Install Gancio
```bash
npm install --global gancio
```
1. Create a database (optional as you can use sqlite, but recommended)
```bash
sudo -u postgres psql
postgres=# create database gancio;
postgres=# create user gancio with encrypted password 'gancio';
postgres=# grant all privileges on database gancio to gancio;
```
1. Create a user to run gancio from
```bash
adduser gancio
su gancio
```
1. Test & launch interactive setup
```bash
gancio --help
gancio setup
```
1. Start
```bash
gancio start
```
1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup.
1. [Setup nginx as a proxy](/setup/nginx)
1. Deploy in production
If you don't use the [docker way](/setup/docker), in production you should use something like **[pm2](http://pm2.keymetrics.io/)**:
```bash
sudo npm install --global pm2
pm2 gancio start
```

View File

@@ -10,7 +10,7 @@ has_toc: false
# Setup
- ## [Setup with docker](/setup/docker)
- ## [Classic setup](/setup/classic)
- ## [Nginx as a proxy](/setup/nginx)
- ## [Hacking & contribute](/dev)
- [Setup with docker](docker)
- [Classic setup](classic)
- [Nginx as a proxy](nginx)
- [Hacking & contribute](../dev)