{ "0": { "id": "0", "title": "", "content": "404 Page not found :( The requested page could not be found.", "url": "https://gancio.org/404.html", "relUrl": "/404.html" }, "1": { "id": "1", "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 configuration, look here for options. "db": { "dialect": "sqlite", "storage": "/tmp/db.sqlite" } Upload path Where to save images "upload_path": "./uploads" SMTP Admin Email of administrator. Email from gancio comes from this email. 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_email": "", "secret": "notsosecret" }", "url": "https://gancio.org/config", "relUrl": "/config" }, "2": { "id": "2", "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 Launch interactive setup gancio setup --config config.json Start gancio start --config config.json Point your web browser to http://localhost:13120 or where you selected during setup. Setup nginx as a proxy To deploy gancio in production you should use something like pm2: sudo yarn global add pm2 pm2 start gancio -- --config config.json # Run this command to run your application as a service and automatically restart after a reboot: pm2 startup # read the output! sudo pm2 startup -u gancio Upgrade sudo yarn global add gancio sudo service pm2 restart", "url": "https://gancio.org/install/debian", "relUrl": "/install/debian" }, "3": { "id": "3", "title": "Hacking", "content": "Development Stack Gancio is built with following technologies: Nuxt.js Vue.js Express Node.js Sequelize Element.ui Testing on your own machine Download source git clone https://framagit.org/les/gancio Install dependencies yarn Hacking yarn dev Please use the issue board and the forum to discuss any modification.", "url": "https://gancio.org/dev", "relUrl": "/dev" }, "4": { "id": "4", "title": "Docker", "content": "Initial setup Use sqlite Use postgreSQL Start gancio Upgrade Initial setup 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 note that you can choose a different directory. Use sqlite Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml Create an empty db and config (this is needed) touch config.json db.sqlite mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=sqlite Use postgreSQL Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/postgres/docker-compose.yml Create an empty configuration (this is needed) touch config.json mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=postgres Start gancio Run your container docker-compose up -d Look at logs with docker-compose logs 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. Upgrade cd /opt/gancio docker-compose up -d --no-deps --build", "url": "https://gancio.org/install/docker", "relUrl": "/install/docker" }, "5": { "id": "5", "title": "Home", "content": "Gancio A shared agenda for local communities. Get started now Demo Source Features Very easy UI User registration (you can follow them from fediverse personally or follow the whole instance with a special user) Support anonymous event (admin confirmation needed) Multidays events support (festival, conferences…) Recurrent events support (each monday, each two monday, each monday and friday, each first of month, each first monday of month, etc..) Filters events for tags or places RSS and ICS export (with filters) embeddable iframe (example) boost / bookmark / comment events from mastodon! Lot of configurations available (user registration open/close, enable AP federation, enable recurrent events) About the project Gancio is made with :heart: by hacklab underscore License Gancio is distributed by an AGPL-3.0 Licence.", "url": "https://gancio.org/", "relUrl": "/" }, "6": { "id": "6", "title": "Install", "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" }, "7": { "id": "7", "title": "Instances", "content": "Instances gancio.cisti.org (Torino, Italy) lapunta.org (Firenze, Italy)", "url": "https://gancio.org/instances", "relUrl": "/instances" }, "8": { "id": "8", "title": "Support a new language", "content": "Add a new locale watch this commit", "url": "https://gancio.org/dev/locales", "relUrl": "/dev/locales" }, "9": { "id": "9", "title": "Migration", "content": "If you need to modify the db’s structure while hacking, just change server/api/models/ and remember to create a migration, to understand how things works check the sequelize documentation", "url": "https://gancio.org/dev/migration", "relUrl": "/dev/migration" }, "10": { "id": "10", "title": "Nginx", "content": "Nginx proxy configuration This is the default nginx configuration for gancio, please modify at least the server_name and ssl_certificate’s path. Note that this does not include a cache configuration and that gancio does not use a cache control at all, if you can help with this task you’re welcome. server { listen 80; listen [::]:80; server_name gancio.cisti.org; root /var/www/letsencrypt; location /.well-known/acme-challenge/ { allow all; } location / { return 301 https://$host$request_uri; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name gancio.cisti.org; ssl_protocols TLSv1.2; ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; # Uncomment these lines once you acquire a certificate: # ssl_certificate /etc/letsencrypt/live/gancio.cisti.org/fullchain.pem; # ssl_certificate_key /etc/letsencrypt/live/gancio.cisti.org/privkey.pem; keepalive_timeout 70; sendfile on; client_max_body_size 80m; gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; add_header Strict-Transport-Security "max-age=31536000"; location / { try_files $uri @proxy; } location @proxy { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header Proxy ""; proxy_pass_header Server; proxy_pass http://127.0.0.1:13120; proxy_buffering on; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; tcp_nodelay on; } }", "url": "https://gancio.org/install/nginx", "relUrl": "/install/nginx" }, "11": { "id": "11", "title": "Project Structure", "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.", "url": "https://gancio.org/dev/structure", "relUrl": "/dev/structure" } }