"content":"Install Install Node.js and postgreSQL curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs postgresql source Install Gancio npm install --global gancio Create a database (optional as you can use sqlite, but recommended) 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; Create a user to run gancio from adduser gancio su gancio Test & launch interactive setup gancio --help gancio setup --config config.json Start gancio --help gancio start --config config.json Point your web browser to http://localhost:13120 or where you selected during setup. Setup nginx as a proxy Deploy in production If you don’t use the docker way, in production you should use something like pm2: sudo npm install --global pm2 pm2 gancio start --config config.json",
"url":"https://gancio.org/install/classic",
"relUrl":"/install/classic"
},
"3":{
"id":"3",
"title":"Configuration",
"content":"Configuration 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. eg. gancio start --config ./config.json eg. pm2 start gancio start -- --config ~/config.json Title Description BaseURL Server Database Upload path SMTP Admin Favicon User locale Secret Default settings Title The title will be in rss feed, in html head and in emails: "title": "Gancio" 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 "server": { "host": "localhost", "port": 13120 } Database "db": { "dialect": "sqlite", "storage": "/tmp/db.sqlite" } Upload path Where to save images "upload_path": "./uploads" SMTP Admin Favicon You could specify another favicon. This is also used as logo (top-left corner): "favicon": "./favicon.ico" 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: export default { about: 'A new about' } and then point the user_locale configuration to that directory: "user_locale": "/opt/gancio/user_locale" Watch here for a list of strings you can override. :warning: Note that a restart is needed when you change user_locale’s content. Secret Default settings { "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" }",
"url":"https://gancio.org/config",
"relUrl":"/config"
},
"4":{
"id":"4",
"3":{
"id":"3",
"title":"Contribute",
"content":"Contribute If you want to contribute, take a look at the issues Code Translate Design Documentation Share Code Translate Design Documentation Share",
"url":"https://gancio.org/contribute",
"relUrl":"/contribute"
},
"4":{
"id":"4",
"title":"Debian",
"content":"Debian installation Install Node.js & yarn (from root) curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list apt-get update && apt-get install yarn source Install Gancio yarn add gancio --prod Setup with postgreSQL (optional as you can choose sqlite) apt-get install postgresql # Create the database su postgres -c psql postgres=# create database gancio; postgres=# create user gancio with encrypted password 'gancio'; postgres=# grant all privileges on database gancio to gancio; Create a user to run gancio from adduser gancio su gancio Test & launch interactive setup gancio --help gancio setup --config config.json Start gancio --help gancio start --config config.json Point your web browser to http://localhost:13120 or where you selected during setup. Setup nginx as a proxy Deploy in production If you don’t use the docker way, in production you should use something like pm2: sudo yarn global add pm2 pm2 gancio start --config config.json",
"url":"https://gancio.org/install/debian",
"relUrl":"/install/debian"
},
"5":{
"id":"5",
"title":"Hacking",
...
...
@@ -44,7 +44,7 @@
"6":{
"id":"6",
"title":"Docker",
"content":"Install with docker You do not need to clone the full repo as we distribute gancio via npm. Dockerfile and docker-compose.yml are the only needed files. Create a directory where everything related to gancio is stored (db, images, config) mkdir /opt/gancio cd /opt/gancio :information_source: you can choose a different directory of course Download docker-compose.yml and Dockerfile wget https://git.lattuga.net/cisti/gancio/raw/master/docker/Dockerfile wget https://git.lattuga.net/cisti/gancio/raw/master/docker/docker-compose.yml Create an empty configuration file (db.sqlite only needed for sqlite setup) touch config.json db.sqlite After first setup, you can edit config.json file and restart the container on your needs. Build docker image and launch interactive setup in one step docker-compose run --rm gancio gancio setup --docker Run your container docker-compose up -d Setup nginx as a proxy Point your web browser to http://localhost:13120 or where you specified during setup and enjoy :tada:",
"content":"Install with docker You do not need to clone the full repo as we distribute gancio via npm. A Dockerfile and a docker-compose.yml are the only files needed. Create a directory where everything related to gancio is stored (db, images, config) mkdir /opt/gancio cd /opt/gancio :information_source: you can choose a different directory. Using postgreSQL Download docker-compose.yml and Dockerfile wget https://git.lattuga.net/cisti/gancio/raw/master/docker/Dockerfile wget https://git.lattuga.net/cisti/gancio/raw/master/docker/docker-compose.postgresql.yml -O docker.compose.yml Create an empty configiguration (this is needed) touch config.json Using sqlite Download docker-compose.yml and Dockerfile wget https://git.lattuga.net/cisti/gancio/raw/master/docker/Dockerfile wget https://git.lattuga.net/cisti/gancio/raw/master/docker/docker-compose.sqlite.yml -O docker-compose.yml Create an empty db and config (this is needed) touch config.json db.sqlite Finish Build docker image and launch interactive setup in one step docker-compose run --rm gancio gancio setup --docker Run your container docker-compose up -d Setup nginx as a proxy Point your web browser to http://localhost:13120 or where you specified during setup and enjoy :tada: You can edit config.json file and restart the container on your needs, see Configuration for more details.",
"url":"https://gancio.org/install/docker",
"relUrl":"/install/docker"
},
...
...
@@ -58,7 +58,7 @@
"8":{
"id":"8",
"title":"Install",
"content":"Install Classic install Using docker Nginx as a proxy Hacking & contribute",
"content":"Install (production) Install on Debian Install using docker Post installation Nginx as a proxy If you wanna hack or run the current develop release take a look at Hacking & contribute",
"url":"https://gancio.org/install",
"relUrl":"/install"
},
...
...
@@ -86,7 +86,7 @@
"12":{
"id":"12",
"title":"Project Structure",
"content":"Structure API / backend Source code inside server/api/. index.js is basically a routing table pointing each PATH with specified HTTP VERB to a method of a controller. jwt is used to authenticate api request. Express is based on middleware, passing each request to a chain of methods. If you come from a PHP background, note that the main difference with Node.js is that the server process is always running and able to manage multiple requests and tasks together (asyncronically) while each php process is tied to a single request. Sequelize is used as ORM. Take a look in /server/api/models. Client / frontend Nuxt.js is used here! Nuxt is basically Vue plus SSR (Server Side Rendering). Client routing in nuxt is automatic (if you don’t need something special), just put your page inside pages and that’s it!",
"content":"Project structure API / backend Client / frontend Federation / ActivityPub API / backend Source code inside server/api/. index.js is basically a routing table pointing each PATH with specified HTTP VERB to a method of a controller. jwt is used to authenticate api request. Express.js is based on middleware, passing each request to a chain of methods. If you come from a PHP background, note that the main difference with Node.js is that the server process is always running and able to manage multiple requests and tasks together (asyncronically) while each php process is tied to a single request. Sequelize is used as ORM. Take a look in /server/api/models. Client / frontend Nuxt.js is used here! Nuxt is basically Vue plus SSR (Server Side Rendering). Client routing in nuxt is automatic (if you don’t need something special), just put your page inside pages and that’s it! Federation / ActivityPub Code inside server/federation.",
<codeclass="highlighter-rouge">index.js</code> is basically a routing table pointing each PATH with specified
HTTP VERB to a method of a controller.</p>
<p>jwt is used to authenticate api request.</p>
<p>Express is based on middleware, passing each request to a chain of methods.</p>
<p><ahref="https://expressjs.com/">Express.js</a> is based on middleware, passing each request to a chain of methods.</p>
<p>If you come from a PHP background, note that the main difference with
Node.js is that the server process is always running and able to manage
<ahref="https://en.wikipedia.org/wiki/Node.js">Node.js</a> is that the server process is always running and able to manage
multiple requests and tasks together (asyncronically) while each php
process is tied to a single request.</p>
<p>Sequelize is used as ORM. Take a look in <codeclass="highlighter-rouge">/server/api/models</code>.</p>
<p><ahref="https://sequelize.org/">Sequelize</a> is used as ORM. Take a look in <ahref="https://git.lattuga.net/cisti/gancio/src/master/server/api/models"><codeclass="highlighter-rouge">/server/api/models</code></a>.</p>
<h3id="client--frontend">Client / frontend</h3>
<p>Nuxt.js is used here!<br/>
...
...
@@ -325,6 +330,8 @@ Nuxt is basically Vue plus SSR (Server Side Rendering).
Client routing in nuxt is automatic (if you don’t need something special),
just put your page inside <codeclass="highlighter-rouge">pages</code> and that’s it!</p>
<?xml version="1.0" encoding="utf-8"?><feedxmlns="http://www.w3.org/2005/Atom"><generatoruri="https://jekyllrb.com/"version="3.8.6">Jekyll</generator><linkhref="https://gancio.org/feed.xml"rel="self"type="application/atom+xml"/><linkhref="https://gancio.org/"rel="alternate"type="text/html"/><updated>2019-08-05T01:50:43+02:00</updated><id>https://gancio.org/feed.xml</id><titletype="html">Gancio</title><subtitle>A shared agenda for local communities</subtitle></feed>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><feedxmlns="http://www.w3.org/2005/Atom"><generatoruri="https://jekyllrb.com/"version="3.8.6">Jekyll</generator><linkhref="https://gancio.org/feed.xml"rel="self"type="application/atom+xml"/><linkhref="https://gancio.org/"rel="alternate"type="text/html"/><updated>2019-08-06T01:01:30+02:00</updated><id>https://gancio.org/feed.xml</id><titletype="html">Gancio</title><subtitle>A shared agenda for local communities</subtitle></feed>
{"@type":"WebPage","url":"https://gancio.org/install/classic","headline":"Classic","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
{"@type":"WebPage","url":"https://gancio.org/install/debian","headline":"Debian","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
<p>Point your web browser to <ahref="http://localhost:13120">http://localhost:13120</a> or where you selected during setup.</p>
</li>
<li>
<p><ahref="/setup/nginx">Setup nginx as a proxy</a></p>
<p><ahref="/install/nginx">Setup nginx as a proxy</a></p>
</li>
<li>Deploy in production<br/>
If you don’t use the <ahref="/setup/docker">docker way</a>, in production you should use something like <strong><ahref="http://pm2.keymetrics.io/">pm2</a></strong>:</li>
If you don’t use the <ahref="/install/docker">docker way</a>, in production you should use something like <strong><ahref="http://pm2.keymetrics.io/">pm2</a></strong>:</li>
<h2id="install-with-docker">Install with docker</h2>
<p><strong>You do not need to clone the full repo as we distribute gancio via npm.</strong><br>
<ahref="https://git.lattuga.net/cisti/gancio/raw/docker/docker/Dockerfile">Dockerfile</a> and <ahref="https://git.lattuga.net/cisti/gancio/raw/docker/docker/docker-compose.yml">docker-compose.yml</a> are the only needed files.</p>
A <ahref="https://git.lattuga.net/cisti/gancio/raw/docker/docker/Dockerfile">Dockerfile</a> and a docker-compose.yml are the only files needed.</p>
<ol>
<li>Create a directory where everything related to gancio is stored (db, images, config)
<p><imgclass="emoji"title=":information_source:"alt=":information_source:"src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png"height="20"width="20"> you can choose a different directory of course</p>
<p><imgclass="emoji"title=":information_source:"alt=":information_source:"src="https://github.githubassets.com/images/icons/emoji/unicode/2139.png"height="20"width="20"><small>you can choose a different directory.</small></p>
<p><small>After first setup, you can edit <codeclass="highlighter-rouge">config.json</code> file and restart the container on your needs.</small></p>
</li>
</ol>
<h3id="finish">Finish</h3>
<ol>
<li>Build docker image and launch interactive setup in one step
<divclass="highlighter-rouge">
<divclass="highlight"><preclass="highlight"><code>docker-compose run --rm gancio gancio setup --docker
...
...
@@ -338,10 +359,12 @@ setup)
</code></pre></div></div>
</li>
<li>
<p><ahref="/setup/nginx">Setup nginx as a proxy</a></p>
<p><ahref="/install/nginx">Setup nginx as a proxy</a></p>
</li>
<li>
<p>Point your web browser to <ahref="http://localhost:13120">http://localhost:13120</a> or where you specified during setup and enjoy <imgclass="emoji"title=":tada:"alt=":tada:"src="https://github.githubassets.com/images/icons/emoji/unicode/1f389.png"height="20"width="20"></p>
</li>
<li>Point your web browser to <ahref="http://localhost:13120">http://localhost:13120</a> or where you specified during setup and enjoy <imgclass="emoji"title=":tada:"alt=":tada:"src="https://github.githubassets.com/images/icons/emoji/unicode/1f389.png"height="20"width="20">
</li>
<li>You can edit <codeclass="highlighter-rouge">config.json</code> file and restart the container on your needs, see <ahref="/config">Configuration</a> for more details.</li>