diff --git a/docs/_site/assets/js/search-data.json b/docs/_site/assets/js/search-data.json index d3c51071..36e12476 100644 --- a/docs/_site/assets/js/search-data.json +++ b/docs/_site/assets/js/search-data.json @@ -9,35 +9,35 @@ "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": { "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" }", + "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 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", + "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: sudo env PATH=$PATH:/usr/local/bin pm2 startup -u gancio", "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", + "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": "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://framagit.org/les/gancio/raw/master/docker/Dockerfile wget https://framagit.org/les/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://framagit.org/les/gancio/raw/master/docker/Dockerfile wget https://framagit.org/les/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.", + "content": "Initial setup Use sqlite Use postgreSQL Start gancio 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://framagit.org/les/gancio/raw/master/docker/Dockerfile wget https://framagit.org/les/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 mkdir user_locale Build docker image and launch interactive setup in one step docker-compose run --rm gancio gancio setup --docker --db=sqlite Use postgreSQL Download docker-compose.yml and Dockerfile wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.postgresql.yml -O 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 run --rm gancio gancio setup --docker --db=postgresql 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.", "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 About the project Gancio is made with :heart: by hacklab underscore License Gancio is distributed by an AGPL-3.0 Licence.", + "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": "/" }, @@ -58,14 +58,14 @@ "8": { "id": "8", "title": "Support a new language", - "content": "Add a new locale watch this commit https://framagit.org/les/gancio/commit/cd95c7eb3b9e4bc4832a7b33d8d79b4fd3cbda2d", + "content": "Add a new locale watch this commit", "url": "https://gancio.org/dev/locales", "relUrl": "/dev/locales" }, "9": { "id": "9", "title": "Migration", - "content": "Migration If you need to modify the db’s structure while hacking, it’s super easy, just change server/api/models/. If you then decide that your changes are good for production, a sequelize migration is needed: Create a migration: ./node_modules/.bin/sequelize migration:generate --name your_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" }, diff --git a/docs/_site/config.html b/docs/_site/config.html index 987be947..0d305d7e 100644 --- a/docs/_site/config.html +++ b/docs/_site/config.html @@ -326,6 +326,7 @@ This shoud be a .json or a Database +

DB configuration, look here for options.

"db": {
   "dialect": "sqlite",
@@ -343,6 +344,7 @@ This shoud be a .json or a Admin
+    

Email of administrator. Email from gancio comes from this email.

  • Favicon

    @@ -402,7 +404,7 @@ user_locale’s content.

    "secure": true, "host": "" }, - "admin": "", + "admin_email": "", "secret": "notsosecret" }
  • diff --git a/docs/_site/dev.html b/docs/_site/dev.html index bac564ae..fd214b3c 100644 --- a/docs/_site/dev.html +++ b/docs/_site/dev.html @@ -295,6 +295,8 @@ +

    Please use the issue board and the forum to discuss any modification.

    +
    diff --git a/docs/_site/dev/locales.html b/docs/_site/dev/locales.html index a50c5a55..bee56ae7 100644 --- a/docs/_site/dev/locales.html +++ b/docs/_site/dev/locales.html @@ -275,7 +275,7 @@

    Add a new locale

    -

    watch this commit https://framagit.org/les/gancio/commit/cd95c7eb3b9e4bc4832a7b33d8d79b4fd3cbda2d

    +

    watch this commit

    diff --git a/docs/_site/dev/migration.html b/docs/_site/dev/migration.html index e4caa6e8..6216443f 100644 --- a/docs/_site/dev/migration.html +++ b/docs/_site/dev/migration.html @@ -274,15 +274,8 @@
    -

    Migration

    -

    If you need to modify the db’s structure while hacking, it’s super easy, -just change server/api/models/.

    - -

    If you then decide that your changes are good for production, a -sequelize migration is needed:

    - -

    Create a migration:

    -

    ./node_modules/.bin/sequelize migration:generate --name your_migration

    +

    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

    diff --git a/docs/_site/feed.xml b/docs/_site/feed.xml index d6ebe32f..8a6368a2 100644 --- a/docs/_site/feed.xml +++ b/docs/_site/feed.xml @@ -1 +1 @@ -Jekyll2019-09-21T23:24:31+02:00https://gancio.org/feed.xmlGancioA shared agenda for local communities \ No newline at end of file +Jekyll2019-09-24T11:45:35+02:00https://gancio.org/feed.xmlGancioA shared agenda for local communities \ No newline at end of file diff --git a/docs/_site/index.html b/docs/_site/index.html index 556d1d91..cef58f84 100644 --- a/docs/_site/index.html +++ b/docs/_site/index.html @@ -279,6 +279,20 @@ assets/thumbs/mobile2.png assets/thumbs/admin_users.png

    +

    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

    diff --git a/docs/_site/install/debian.html b/docs/_site/install/debian.html index 14b7f56f..cffaa435 100644 --- a/docs/_site/install/debian.html +++ b/docs/_site/install/debian.html @@ -304,14 +304,12 @@ su postgres -c psql su gancio
    -
  • Test & launch interactive setup -
    gancio --help
    -gancio setup --config config.json
    +  
  • Launch interactive setup +
    gancio setup --config config.json
     
  • Start -
    gancio --help
    -gancio start --config config.json
    +    
    gancio start --config config.json
     
  • @@ -320,12 +318,14 @@ gancio start --config config.json
  • Setup nginx as a proxy

  • -
  • Deploy in production
    -If you don’t use the docker way, in production you should use something like pm2:
  • +
  • To deploy gancio in production you should use something like pm2:
  • sudo yarn global add pm2
    -pm2 gancio start --config config.json
    +pm2 start gancio -- --config config.json
    +
    +# Run this command to run your application as a service:
    +sudo env PATH=$PATH:/usr/local/bin pm2 startup -u gancio
     
    diff --git a/docs/_site/install/docker.html b/docs/_site/install/docker.html index 885fb68b..e66af5a9 100644 --- a/docs/_site/install/docker.html +++ b/docs/_site/install/docker.html @@ -275,61 +275,92 @@
    -

    Install with docker

    +

    Table of contents

    + +
      +
    1. Initial setup
    2. +
    3. Use sqlite
    4. +
    5. Use postgreSQL
    6. +
    7. Start gancio
    8. +
    + +

    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.

    -
      -
    1. Create a directory where everything related to gancio is stored (db, images, config) +
        +
      • +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.

        +

        note that you can choose a different directory.

      • -
    + -

    Using postgreSQL

    -
      -
    1. Download docker-compose.yml and Dockerfile -
      +

      Use sqlite

      +
      +
        +
      1. +Download docker-compose.yml and Dockerfile +
        wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile
        -wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.postgresql.yml -O docker.compose.yml
        -
        -
      2. -
      3. Create an empty configiguration (this is needed) -
        -
        touch config.json
        -
        -
      4. -
      - -

      Using sqlite

      -
        -
      1. Download docker-compose.yml and Dockerfile -
        -
        wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile
        -wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.sqlite.yml -O docker-compose.yml
        -
        -
      2. -
      3. Create an empty db and config (this is needed) -
        +wget https://framagit.org/les/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
    -
    -
  • - +mkdir user_locale +
    + +
  • Build docker image and launch interactive setup in one step +
    +
    docker-compose run --rm gancio gancio setup --docker --db=sqlite
    +
    +
  • + + -

    Finish

    +

    Use postgreSQL

    +
    + +
      +
    1. +Download docker-compose.yml and Dockerfile +
      +
      wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile
      +wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.postgresql.yml \ 
      + -O docker.compose.yml
      +
      +
    2. +
    3. Create an empty configuration (this is needed) +
      +
      touch config.json
      +mkdir user_locale
      +
      +
    4. +
    5. Build docker image and launch interactive setup in one step +
      +
      docker-compose run --rm gancio gancio setup --docker --db=postgresql
      +
      +
    6. +
    +
    + +

    Start gancio

      -
    1. Build docker image and launch interactive setup in one step -
      -
      docker-compose run --rm gancio gancio setup --docker
      -
      -
    2. Run your container
      docker-compose up -d
      +
      +
    3. +
    4. Look at logs with +
      +
      docker-compose logs
       
    5. diff --git a/docs/configuration.md b/docs/configuration.md index d097aeb3..4c710fb5 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -41,6 +41,7 @@ This probably support unix socket too :D ``` - ### Database +DB configuration, look [here](https://sequelize.org/master/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor) for options. ```json "db": { "dialect": "sqlite", @@ -53,6 +54,8 @@ Where to save images - ### 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): @@ -108,7 +111,7 @@ user_locale's content. "secure": true, "host": "" }, - "admin": "", + "admin_email": "", "secret": "notsosecret" } ``` diff --git a/docs/dev/dev.md b/docs/dev/dev.md index 06d84bd3..eb3e32df 100644 --- a/docs/dev/dev.md +++ b/docs/dev/dev.md @@ -33,3 +33,5 @@ yarn ```bash yarn dev ``` + +Please use the [issue board](https://framagit.org/les/gancio/-/boards) and the [forum](https://framavox.org/g/hMXTDgtJ/gancio) to discuss any modification. \ No newline at end of file diff --git a/docs/dev/locales.md b/docs/dev/locales.md index 7110c02a..302f23c2 100644 --- a/docs/dev/locales.md +++ b/docs/dev/locales.md @@ -6,4 +6,4 @@ parent: Hacking --- ### Add a new locale -watch this commit https://framagit.org/les/gancio/commit/cd95c7eb3b9e4bc4832a7b33d8d79b4fd3cbda2d \ No newline at end of file +watch [this commit](https://framagit.org/les/gancio/commit/cd95c7eb3b9e4bc4832a7b33d8d79b4fd3cbda2d) \ No newline at end of file diff --git a/docs/dev/migration.md b/docs/dev/migration.md index f0e65547..4376568c 100644 --- a/docs/dev/migration.md +++ b/docs/dev/migration.md @@ -5,14 +5,7 @@ permalink: /dev/migration parent: Hacking --- -### Migration -If you need to modify the db's structure while hacking, it's super easy, -just change `server/api/models/`. - -If you then decide that your changes are good for production, a -sequelize migration is needed: - -#### Create a migration: -`./node_modules/.bin/sequelize migration:generate --name your_migration` +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](https://sequelize.org/master/manual/migrations.html) diff --git a/docs/index.md b/docs/index.md index 166ba8d9..9a567f36 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,6 +21,18 @@ A shared agenda for local communities. [![assets/thumbs/admin_users.png](assets/thumbs/admin_users.png)](assets/admin_users.png){: data-fancybox="group" data-caption="Admin interface"} +## 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](https://gancio.cisti.org/embed/list?title=Upcoming events)) +- 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](https://autistici.org/underscore) diff --git a/docs/install/debian.md b/docs/install/debian.md index 03fa8027..28609d76 100644 --- a/docs/install/debian.md +++ b/docs/install/debian.md @@ -38,25 +38,25 @@ adduser gancio su gancio ``` -1. Test & launch interactive setup +1. Launch interactive setup ```bash -gancio --help gancio setup --config config.json ``` 1. Start ```bash -gancio --help gancio start --config config.json ``` 1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup. 1. [Setup nginx as a proxy](/install/nginx) -1. Deploy in production -If you don't use the [docker way](/install/docker), in production you should use something like **[pm2](http://pm2.keymetrics.io/)**: +1. To deploy gancio in production you should use something like **[pm2](http://pm2.keymetrics.io/)**: ```bash sudo yarn global add pm2 -pm2 gancio start --config config.json +pm2 start gancio -- --config config.json + +# Run this command to run your application as a service: +sudo env PATH=$PATH:/usr/local/bin pm2 startup -u gancio ``` diff --git a/docs/install/docker.md b/docs/install/docker.md index 5054e0eb..f66dc0ca 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -4,54 +4,79 @@ title: Docker permalink: /install/docker parent: Install --- +## Table of contents +{: .no_toc .text-delta } -## Install with docker +1. TOC +{:toc} + +## Initial setup **You do not need to clone the full repo as we distribute gancio via npm.** A [Dockerfile](https://framagit.org/les/gancio/raw/docker/docker/Dockerfile) and a docker-compose.yml are the only files needed. -1. Create a directory where everything related to gancio is stored (db, images, config) +- __Create a directory where everything related to gancio is stored (db, images, config)__ ```bash mkdir /opt/gancio cd /opt/gancio ``` -:information_source: you can choose a different directory. +note that you can choose a different directory. -### Using postgreSQL -1. Download docker-compose.yml and Dockerfile +## Use sqlite +
      +1. **Download docker-compose.yml and Dockerfile** ```bash wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile -wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.postgresql.yml -O docker.compose.yml -``` - -1. Create an empty configiguration (**this is needed**) -``` -touch config.json -``` - -### Using sqlite -1. Download docker-compose.yml and Dockerfile -```bash -wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile -wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.sqlite.yml -O docker-compose.yml +wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.sqlite.yml \ + -O docker-compose.yml ``` 1. Create an empty db and config (**this is needed**) ``` touch config.json db.sqlite +mkdir user_locale ``` -### Finish - 1. Build docker image and launch interactive setup in one step ``` -docker-compose run --rm gancio gancio setup --docker +docker-compose run --rm gancio gancio setup --docker --db=sqlite ``` +
      + +## Use postgreSQL +
      + +1. **Download docker-compose.yml and Dockerfile** +```bash +wget https://framagit.org/les/gancio/raw/master/docker/Dockerfile +wget https://framagit.org/les/gancio/raw/master/docker/docker-compose.postgresql.yml \ + -O docker.compose.yml +``` + +1. Create an empty configuration (**this is needed**) +``` +touch config.json +mkdir user_locale +``` + +1. Build docker image and launch interactive setup in one step +``` +docker-compose run --rm gancio gancio setup --docker --db=postgresql +``` +
      + + +## Start gancio 1. Run your container ```bash docker-compose up -d ``` +1. Look at logs with +```bash +docker-compose logs +``` + 1. [Setup nginx as a proxy](/install/nginx) 1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you specified during setup and enjoy :tada: diff --git a/server/api/controller/user.js b/server/api/controller/user.js index 969046c4..d6277e5d 100644 --- a/server/api/controller/user.js +++ b/server/api/controller/user.js @@ -276,7 +276,7 @@ const userController = { const user = await User.create(req.body) try { mail.send(user.email, 'register', { user, config }) - mail.send(config.admin, 'admin_register', { user, config }) + mail.send(config.admin_email, 'admin_register', { user, config }) } catch (e) { return res.status(400).json(e) } diff --git a/server/api/mail.js b/server/api/mail.js index 5ce85f54..e5bf5056 100644 --- a/server/api/mail.js +++ b/server/api/mail.js @@ -22,7 +22,7 @@ const mail = { } }, message: { - from: `${config.title} <${config.admin}>` + from: `${config.title} <${config.admin_email}>` }, send: true, i18n: { diff --git a/server/cli.js b/server/cli.js index 9a8908c0..2bc2fe75 100755 --- a/server/cli.js +++ b/server/cli.js @@ -33,7 +33,10 @@ async function setupQuestionnaire(is_docker, db) { message: 'Specify a baseurl for this gancio installation! (eg. http://gancio.cisti.org)', name: 'baseurl', default: 'http://localhost:13120', - validate: notEmpty + validate: value => { + if (!value) return false + return /^https?:\/\//.test(value) + } }) questions.push({ @@ -134,6 +137,9 @@ async function setupQuestionnaire(is_docker, db) { questions.push({ name: 'admin.email', message: `Admin email (a first user with this username will be created)`, + default: options => { + return options.title.replace(' ', '').toLowerCase() + '@' + options.baseurl + }, validate: notEmpty }) diff --git a/server/federation/helpers.js b/server/federation/helpers.js index 5442413d..b5973d29 100644 --- a/server/federation/helpers.js +++ b/server/federation/helpers.js @@ -61,9 +61,9 @@ const Helpers = { // event is sent by user that published it and by the admin instance // collect followers from admin and user - const instanceAdmin = await User.findOne({ where: { email: config.admin }, include: { model: FedUsers, as: 'followers' } }) + const instanceAdmin = await User.findOne({ where: { email: config.admin_email }, include: { model: FedUsers, as: 'followers' } }) if (!instanceAdmin || !instanceAdmin.username) { - debug('Instance admin not found (there is no user with email => %s)', config.admin) + debug('Instance admin not found (there is no user with email => %s)', config.admin_email) return }