Move docs to separate repo
See https://framagit.org/framasoft/joinmobilizon/documentation Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
08ac6040ba
commit
d965997c78
|
@ -77,7 +77,6 @@ exunit:
|
|||
- lint
|
||||
script:
|
||||
- mix coveralls
|
||||
|
||||
# cypress:
|
||||
# stage: test
|
||||
# services:
|
||||
|
@ -103,24 +102,22 @@ exunit:
|
|||
# - js/tests/e2e/screenshots/**/*.png
|
||||
# - js/tests/e2e/videos/**/*.mp4
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- mkdir public
|
||||
- mkdocs build
|
||||
- cd docs/fr && mkdocs build && cd ../../
|
||||
- mv site/* public/
|
||||
# Mix docs disabled because of https://github.com/elixir-lang/ex_doc/issues/1172
|
||||
# - mix deps.get
|
||||
# - mix docs
|
||||
# - mv doc public/backend
|
||||
#- cd js
|
||||
#- yarn install
|
||||
#- yarn run styleguide:build
|
||||
#- mv styleguide ../public/frontend
|
||||
only:
|
||||
- master
|
||||
artifacts:
|
||||
expire_in: 1 hour
|
||||
paths:
|
||||
- public
|
||||
# pages:
|
||||
# stage: deploy
|
||||
# script:
|
||||
# # - mkdir public
|
||||
# # Mobilizon documentation is now on https://framagit.org/framasoft/joinmobilizon/documentation
|
||||
# # Mix docs disabled because of https://github.com/elixir-lang/ex_doc/issues/1172
|
||||
# # - mix deps.get
|
||||
# # - mix docs
|
||||
# # - mv doc public/backend
|
||||
# #- cd js
|
||||
# #- yarn install
|
||||
# #- yarn run styleguide:build
|
||||
# #- mv styleguide ../public/frontend
|
||||
# only:
|
||||
# - master
|
||||
# artifacts:
|
||||
# expire_in: 1 hour
|
||||
# paths:
|
||||
# - public
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
FROM elixir:latest
|
||||
LABEL maintainer="Thomas Citharel <tcit@tcit.fr>"
|
||||
|
||||
ENV REFRESHED_AT=2020-10-20
|
||||
RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 python3-pip cmake
|
||||
ENV REFRESHED_AT=2020-10-22
|
||||
RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 cmake
|
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash && apt-get install nodejs -yq
|
||||
RUN npm install -g yarn wait-on
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN mix local.hex --force && mix local.rebar --force
|
||||
RUN pip3 install mkdocs mkdocs-material pymdown-extensions pygments mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-exclude
|
||||
RUN curl https://dbip.mirror.framasoft.org/files/dbip-city-lite-latest.mmdb --output GeoLite2-City.mmdb -s && mkdir -p /usr/share/GeoIP && mv GeoLite2-City.mmdb /usr/share/GeoIP/
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
# About Mobilizon
|
||||
|
||||
<p align="center">
|
||||
<a href="https://joinmobilizon.org">
|
||||
<img src="https://lutim.cpy.re/qVYC86G9.png" alt="Mobilizon">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Mobilizon is your federated organization and mobilization platform. Gather people with a convivial, ethical, and emancipating tool.
|
||||
|
||||
<p align="center">
|
||||
<strong>Developed with ♥ by <a href="https://framasoft.org">Framasoft</a></strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://framasoft.org">
|
||||
<img width="150px" src="https://lutim.cpy.re/Prd3ci7G.png" alt="Framasoft logo"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Introduction
|
||||
|
||||
Mobilizon is a tool designed to create platforms for managing communities and events. Its purpose is to help as many people as possible to free themselves from Facebook groups and events, from Meetup, etc.
|
||||
|
||||
The Mobilizon software is under a Free licence, so anyone can host a Mobilizon server, called an instance. These instances may federate with each other, so any person with an account on *ExampleMeet* will be able to register to an event created on *SpecimenEvent*.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
### 👤 Identities
|
||||
|
||||
Do you want to separate your family gatherings from your associative activities or militant mobilizations?
|
||||
You will have the power to create multiple identities from the same account, like so many social masks.
|
||||
|
||||
---
|
||||
|
||||
### 📅 Events and groups
|
||||
|
||||
Create your events and make sure they will appeal to everybody.
|
||||
Privacy settings and participants roles are supported.
|
||||
There's no lock-in, you can interact with the event without registration.
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
We appreciate any contribution to Mobilizon. Check our [Contributing](contribute/index.md) page for more information.
|
||||
|
||||
## Links
|
||||
|
||||
### Learn more
|
||||
* 🌐 Official website: [https://joinmobilizon.org](https://joinmobilizon.org)
|
||||
* 💻 Source: [https://framagit.org/framasoft/mobilizon](https://framagit.org/framasoft/mobilizon)
|
||||
* 📝 Wiki: [https://framagit.org/framasoft/mobilizon/wikis/home](https://framagit.org/framasoft/mobilizon/wikis/home)
|
||||
|
||||
### Discuss
|
||||
* 💬 Matrix: `#Mobilizon:matrix.org` [Riot](https://riot.im/app/#/room/#Mobilizon:matrix.org)
|
||||
* IRC: `#mobilizon` on Freenode
|
||||
* 🗣️ Forum: [https://framacolibri.org/c/mobilizon](https://framacolibri.org/c/mobilizon)
|
||||
|
||||
### Follow
|
||||
* 🐘 Mastodon: [https://framapiaf.org/@mobilizon](https://framapiaf.org/@mobilizon)
|
||||
* 🐦 Twitter [https://twitter.com/@joinmobilizon](https://twitter.com/@joinmobilizon)
|
||||
|
||||
Note: Most federation code comes from [Pleroma](https://pleroma.social), which is `Copyright © 2017-2019 Pleroma Authors - AGPL-3.0`
|
|
@ -1,27 +0,0 @@
|
|||
# Maintenance tasks
|
||||
|
||||
## Installation
|
||||
|
||||
Generates new configuration files.
|
||||
|
||||
!!! warning
|
||||
This command generates configuration for your Mobilizon instance and should be run only once when installing.
|
||||
|
||||
If any options are left unspecified, you will be prompted interactively.
|
||||
|
||||
```bash
|
||||
mix mobilizon.instance gen [<options>]
|
||||
```
|
||||
|
||||
### Options
|
||||
* `-f`, `--force` Whether to erase existing files
|
||||
* `-o`, `--output PATH` The path to output the `prod.secret.exs` file. Defaults to `config/prod.secret.exs`.
|
||||
* `--output-psql PATH` The path to output the SQL script. Defaults to `setup_db.psql`.
|
||||
* `--domain DOMAIN` The instance's domain
|
||||
* `--instance-name INSTANCE_NAME` The instance's name
|
||||
* `--admin-email ADMIN_EMAIL` The administrator's email
|
||||
* `--dbhost HOSTNAME` The database hostname of the PostgreSQL database to use
|
||||
* `--dbname DBNAME` The name of the database to use
|
||||
* `--dbuser DBUSER` The database user (aka role) to use for the database connection
|
||||
* `--dbpass DBPASS` The database user's password to use for the database connection
|
||||
* `--dbport DBPORT` The database port
|
|
@ -1,17 +0,0 @@
|
|||
# Manage actors
|
||||
|
||||
!!! tip "Environment"
|
||||
You need to run these commands with the appropriate environment loaded, so probably prefix with `MIX_ENV=prod`.
|
||||
|
||||
## List all available commands
|
||||
```bash
|
||||
mix mobilizon.actors
|
||||
```
|
||||
|
||||
## Show an actors details
|
||||
|
||||
```bash
|
||||
mix mobilizon.actors.show
|
||||
```
|
||||
|
||||
In addition to basic informations, it also tells which user the profile belongs to, if local.
|
|
@ -1,57 +0,0 @@
|
|||
# Manage users
|
||||
|
||||
!!! tip "Environment"
|
||||
You need to run these commands with the appropriate environment loaded, so probably prefix with `MIX_ENV=prod`.
|
||||
|
||||
|
||||
## List all available commands
|
||||
```bash
|
||||
mix mobilizon.users
|
||||
```
|
||||
|
||||
## Create a new user
|
||||
|
||||
```bash
|
||||
mix mobilizon.users.new <email> [<options>]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
* `--password <password>`/ `-p <password>` - the user's password. If this option is missing, a password will be generated randomly.
|
||||
* `--moderator` - make the user a moderator
|
||||
* `--admin` - make the user an admin
|
||||
|
||||
## Show an user's details
|
||||
|
||||
Displays if the user has confirmed their email, if they're a moderator or an admin and their profiles.
|
||||
|
||||
```bash
|
||||
mix mobilizon.users.show <email>
|
||||
```
|
||||
|
||||
## Modify an user
|
||||
|
||||
```bash
|
||||
mix mobilizon.users.modify <email>
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
* `--email <email>` - the user's new email
|
||||
* `--password <password>` - the user's new password.
|
||||
* `--user` - make the user a regular user
|
||||
* `--moderator` - make the user a moderator
|
||||
* `--admin` - make the user an admin
|
||||
* `--enable` - enable the user
|
||||
* `--disable` - disable the user
|
||||
|
||||
## Delete an user
|
||||
|
||||
```bash
|
||||
mix mobilizon.users.delete <email>
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
* `--assume_yes`/`-y` Don't ask for confirmation
|
||||
* `--keep_email`/`-k` Keep user entry with just email information (to prevent future registrations with same email)
|
|
@ -1,28 +0,0 @@
|
|||
# Relay
|
||||
|
||||
Manages remote relays
|
||||
|
||||
!!! tip "Environment"
|
||||
You need to run these commands with the appropriate environment loaded, so probably prefix with `MIX_ENV=prod`.
|
||||
|
||||
## Make your instance follow a mobilizon instance
|
||||
|
||||
```bash
|
||||
mix mobilizon.relay follow <relay_host>
|
||||
```
|
||||
|
||||
Example:
|
||||
```bash
|
||||
mix mobilizon.relay follow example.org
|
||||
```
|
||||
|
||||
## Make your instance unfollow a mobilizon instance
|
||||
|
||||
```bash
|
||||
mix mobilizon.relay unfollow <relay_host>
|
||||
```
|
||||
|
||||
Example:
|
||||
```bash
|
||||
mix mobilizon.relay unfollow example.org
|
||||
```
|
|
@ -1,113 +0,0 @@
|
|||
# Authentification
|
||||
|
||||
## LDAP
|
||||
|
||||
Use LDAP for user authentication. When a user logs in to the Mobilizon instance, the email and password will be verified by trying to authenticate
|
||||
(bind) to an LDAP server. If a user exists in the LDAP directory but there is no account with the same email yet on the Mobilizon instance then a new
|
||||
Mobilizon account will be created (without needing email confirmation) with the same email as the LDAP email name.
|
||||
|
||||
!!! tip
|
||||
As Mobilizon uses email for login and LDAP bind is often done with account UID/CN, we need to start by searching for LDAP account matching with this email. LDAP search without bind is often disallowed, so you'll probably need an admin LDAP user.
|
||||
|
||||
|
||||
Change authentification method:
|
||||
```elixir
|
||||
config :mobilizon,
|
||||
Mobilizon.Service.Auth.Authenticator,
|
||||
Mobilizon.Service.Auth.LDAPAuthenticator
|
||||
```
|
||||
|
||||
LDAP configuration under `:mobilizon, :ldap`:
|
||||
|
||||
* `enabled`: enables LDAP authentication
|
||||
* `host`: LDAP server hostname
|
||||
* `port`: LDAP port, e.g. 389 or 636
|
||||
* `ssl`: true to use SSL, usually implies the port 636
|
||||
* `sslopts`: additional SSL options
|
||||
* `tls`: true to start TLS, usually implies the port 389
|
||||
* `tlsopts`: additional TLS options
|
||||
* `base`: LDAP base, e.g. "dc=example,dc=com"
|
||||
* `uid`: LDAP attribute name to authenticate the user, e.g. when "cn", the filter will be "cn=username,base"
|
||||
* `require_bind_for_search` whether admin bind is required to perform search
|
||||
* `bind_uid` the admin uid/cn for binding before searching
|
||||
* `bind_password` the admin password for binding before searching
|
||||
|
||||
Example:
|
||||
|
||||
```elixir
|
||||
config :mobilizon, :ldap,
|
||||
enabled: true,
|
||||
host: "localhost",
|
||||
port: 636,
|
||||
ssl: true,
|
||||
sslopts: [],
|
||||
tls: true,
|
||||
tlsopts: [],
|
||||
base: "ou=users,dc=example,dc=local",
|
||||
uid: "cn",
|
||||
require_bind_for_search: true,
|
||||
bind_uid: "admin_account",
|
||||
bind_password: "some_admin_password"
|
||||
```
|
||||
|
||||
## OAuth
|
||||
|
||||
Mobilizon currently supports the following providers:
|
||||
|
||||
* [Discord](https://github.com/schwarz/ueberauth_discord)
|
||||
* [Facebook](https://github.com/ueberauth/ueberauth_facebook)
|
||||
* [Github](https://github.com/ueberauth/ueberauth_github)
|
||||
* [Gitlab](https://github.com/mtchavez/ueberauth_gitlab) (including self-hosted)
|
||||
* [Google](https://github.com/ueberauth/ueberauth_google)
|
||||
* [Keycloak](https://github.com/Rukenshia/ueberauth_keycloak) (through OpenID Connect)
|
||||
* [Twitter](https://github.com/Rukenshia/ueberauth_keycloak)
|
||||
|
||||
Support for [other providers](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies) can easily be added if requested.
|
||||
|
||||
!!! tip
|
||||
We advise to look at each provider's README file for eventual specific instructions.
|
||||
|
||||
You'll have to start by registering an app at the provider. Be sure to activate features like "Sign-in with" and "emails" scope, as Mobilizon needs users emails to register them.
|
||||
|
||||
Add the configured providers to configuration (you may find the appropriate scopes on the provider's API documentation):
|
||||
```elixir
|
||||
config :ueberauth,
|
||||
Ueberauth,
|
||||
providers: [
|
||||
gitlab: {Ueberauth.Strategy.Gitlab, [default_scope: "read_user"]},
|
||||
keycloak: {Ueberauth.Strategy.Keycloak, [default_scope: "email"]}
|
||||
# ...
|
||||
]
|
||||
```
|
||||
|
||||
In order for the « Sign-in with » buttons to be added on Register and Login pages, list your providers:
|
||||
```elixir
|
||||
config :mobilizon, :auth,
|
||||
oauth_consumer_strategies: [
|
||||
:gitlab,
|
||||
{:keycloak, "My corporate account"}
|
||||
# ...
|
||||
]
|
||||
```
|
||||
|
||||
!!! note
|
||||
If you use the `{:provider_id, "Some label"}` form, the label will be used inside the buttons on Register and Login pages.
|
||||
|
||||
Finally add the configuration for each specific provider. The Client ID and Client Secret are at least required:
|
||||
```elixir
|
||||
config :ueberauth, Ueberauth.Strategy.Facebook.OAuth,
|
||||
client_id: "some_numeric_id",
|
||||
client_secret: "some_secret"
|
||||
|
||||
keycloak_url = "https://some-keycloak-instance.org"
|
||||
|
||||
# Realm may be something else than master
|
||||
config :ueberauth, Ueberauth.Strategy.Keycloak.OAuth,
|
||||
client_id: "some_id",
|
||||
client_secret: "some_hexadecimal_secret",
|
||||
site: keycloak_url,
|
||||
authorize_url: "#{keycloak_url}/auth/realms/master/protocol/openid-connect/auth",
|
||||
token_url: "#{keycloak_url}/auth/realms/master/protocol/openid-connect/token",
|
||||
userinfo_url: "#{keycloak_url}/auth/realms/master/protocol/openid-connect/userinfo",
|
||||
token_method: :post
|
||||
```
|
|
@ -1,31 +0,0 @@
|
|||
# Email
|
||||
|
||||
Mobilizon requires a SMTP server to deliver emails. Using 3rd-party mail providers (Mandrill, SendGrid, Mailjet, …) will be possible in the future.
|
||||
|
||||
## SMTP configuration
|
||||
|
||||
Mobilizon default settings assumes a SMTP server listens on `localhost`, port `25`. To specify a specific server and credentials, you can add the following section in your `prod.secret.exs` file and modify credentials to your needs.
|
||||
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Web.Email.Mailer,
|
||||
adapter: Bamboo.SMTPAdapter,
|
||||
server: "localhost",
|
||||
hostname: "localhost",
|
||||
# usually 25, 465 or 587
|
||||
port: 25,
|
||||
username: nil,
|
||||
password: nil,
|
||||
# can be `:always` or `:never`
|
||||
tls: :if_available,
|
||||
allowed_tls_versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"],
|
||||
retries: 1,
|
||||
# can be `true`
|
||||
no_mx_lookups: false,
|
||||
# can be `:always`. If your smtp relay requires authentication set it to `:always`.
|
||||
auth: :if_available
|
||||
```
|
||||
|
||||
!!! tip
|
||||
The hostname option sets the FQDN to the header of your emails, its optional, but if you don't set it, the underlying `gen_smtp` module will use the hostname of your machine, like `localhost`.
|
||||
|
||||
You'll need to restart Mobilizon to recompile the app and apply the new settings.
|
|
@ -1,154 +0,0 @@
|
|||
# Geocoders
|
||||
|
||||
Geocoding is the ability to match an input **string representing a location - such as an address - to geographical coordinates**.
|
||||
Reverse geocoding is logically the opposite, matching **geographical coordinates to names of places**.
|
||||
|
||||
This is needed to set correct address for events, and more easily find events with geographical data, for instance if you want to discover events happening near your current position.
|
||||
|
||||
However, providing a geocoding service is quite expensive, especially if you want to cover the whole Earth.
|
||||
|
||||
!!! note "Hardware setup"
|
||||
To give an idea of what hardware is required to self-host a geocoding service, we successfully installed and used [Addok](#addok), [Pelias](#pelias) and [Mimirsbrunn](#mimirsbrunn) on a 8 cores/16GB RAM machine without any issues **importing only European addresses and data**.
|
||||
|
||||
!!! tip "Advised provider"
|
||||
We had best results using the [Pelias](#pelias) geocoding provider.
|
||||
|
||||
## Change geocoder
|
||||
|
||||
To change geocoder backend, you need to add the following line in `prod.secret.exs`:
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial,
|
||||
service: Mobilizon.Service.Geospatial.Nominatim
|
||||
```
|
||||
And change `Nominatim` to one of the supported geocoders. Depending on the provider, you'll also need to add some special config to specify eventual endpoints or API keys.
|
||||
|
||||
For instance, when using `Mimirsbrunn`, you'll need the following configuration:
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial,
|
||||
service: Mobilizon.Service.Geospatial.Mimirsbrunn
|
||||
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Mimirsbrunn,
|
||||
endpoint: "https://my-mimir-instance.tld"
|
||||
```
|
||||
|
||||
## List of supported geocoders
|
||||
|
||||
This is the list of all geocoders supported by Mobilizon. The current default one is [Nominatim](#nominatim) and uses the official OpenStreetMap instance.
|
||||
|
||||
### Nominatim
|
||||
|
||||
[Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim) is a GPL-2.0 licenced tool to search data by name and address. It's written in C and PHP and uses PostgreSQL.
|
||||
It's the current default search tool on the [OpenStreetMap homepage](https://www.openstreetmap.org).
|
||||
|
||||
!!! warning "Terms"
|
||||
When using the official Nominatim OpenStreetMap instance (default endpoint for this geocoder if not configured otherwise), you need to read and accept the [Usage Policy](https://operations.osmfoundation.org/policies/nominatim).
|
||||
|
||||
!!! danger "Limitations"
|
||||
Autocomplete is not possible using Nominatim, you'll obtain no suggestions while typing.
|
||||
|
||||
Several companies provide hosted instances of Nominatim that you can query via an API, for example see [MapQuest Open Initiative](https://developer.mapquest.com/documentation/open/nominatim-search).
|
||||
|
||||
** Default configuration **
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Nominatim,
|
||||
endpoint: "https://nominatim.openstreetmap.org",
|
||||
api_key: nil
|
||||
```
|
||||
|
||||
### Addok
|
||||
|
||||
[Addok](https://github.com/addok/addok) is a MIT licenced search engine for address (and only address). It's written in Python and uses Redis.
|
||||
It's used by French government for [adresse.data.gouv.fr](https://adresse.data.gouv.fr).
|
||||
|
||||
!!! warning "Terms"
|
||||
When using France's Addok instance at `api-adresse.data.gouv.fr` (default endpoint for this geocoder if not configured otherwise), you need to read and accept the [GCU](https://adresse.data.gouv.fr/cgu) (in French).
|
||||
|
||||
** Default configuration **
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Addok,
|
||||
endpoint: "https://api-adresse.data.gouv.fr"
|
||||
```
|
||||
|
||||
The default endpoint is limited to France. Geo coding outside of France will return an empty result. Moreover, as France is implicit for this endpoint, country is not part of the result.
|
||||
To conform to `Provider` interface, this provider return "France" as the country.
|
||||
|
||||
If plugged to another endpoint, in another country, it could be useful to change the default country. This can be done in `prod.secret.exs`:
|
||||
|
||||
** change endpoint default country **
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Addok,
|
||||
endpoint: "https://another-endpoint.tld"
|
||||
default_country: "Country"
|
||||
```
|
||||
|
||||
### Photon
|
||||
|
||||
[Photon](https://photon.komoot.de/) is an Apache 2.0 licenced search engine written in Java and powered by ElasticSearch.
|
||||
|
||||
!!! warning "Terms"
|
||||
The terms of use for the official instance (default endpoint for this geocoder if not configured otherwise) are simply the following:
|
||||
> You can use the API for your project, but please be fair - extensive usage will be throttled. We do not guarantee for the availability and usage might be subject of change in the future.
|
||||
|
||||
** Default configuration **
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Photon,
|
||||
endpoint: "https://photon.komoot.de"
|
||||
```
|
||||
|
||||
### Pelias
|
||||
|
||||
[Pelias](https://github.com/pelias/pelias) is a MIT licensed geocoder composed of several services written in NodeJS. It's powered by ElasticSearch.
|
||||
|
||||
There's [Geocode Earth](https://geocode.earth/) SAAS that provides a Pelias API.
|
||||
They offer discounts for Open-Source projects. [See the pricing](https://geocode.earth/).
|
||||
|
||||
**Configuration example**
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Pelias,
|
||||
endpoint: nil
|
||||
```
|
||||
|
||||
### Mimirsbrunn
|
||||
|
||||
[Mimirsbrunn](https://github.com/CanalTP/mimirsbrunn) is an AGPL-3.0 licensed geocoding written in Rust and powered by ElasticSearch.
|
||||
|
||||
Mimirsbrunn is used by [Qwant Maps](https://www.qwant.com/maps) and [Navitia](https://www.navitia.io).
|
||||
|
||||
** Default configuration **
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.Mimirsbrunn,
|
||||
endpoint: nil
|
||||
```
|
||||
|
||||
### Google Maps
|
||||
|
||||
[Google Maps](https://developers.google.com/maps/documentation/geocoding/intro) is a proprietary service that provides APIs for geocoding.
|
||||
|
||||
They don't have a free plan, but offer credit when creating a new account. [See the pricing](https://cloud.google.com/maps-platform/pricing/).
|
||||
|
||||
** Default configuration **
|
||||
|
||||
!!! note
|
||||
`fetch_place_details` tells GoogleMaps to also fetch some details on a place when geocoding. It can be more expensive, since you're doing two requests to Google instead of one.
|
||||
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.GoogleMaps,
|
||||
api_key: nil,
|
||||
fetch_place_details: true
|
||||
```
|
||||
|
||||
### MapQuest
|
||||
|
||||
[MapQuest](https://developer.mapquest.com/documentation/open/geocoding-api/) is a proprietary service that provides APIs for geocoding.
|
||||
|
||||
They offer a free plan. [See the pricing](https://developer.mapquest.com/plans).
|
||||
|
||||
** Default configuration **
|
||||
```elixir
|
||||
config :mobilizon, Mobilizon.Service.Geospatial.MapQuest,
|
||||
api_key: nil
|
||||
```
|
||||
|
||||
### More geocoding services
|
||||
|
||||
Geocoding implementations are simple modules that need to implement the [`Mobilizon.Service.Geospatial.Provider` behaviour](https://framasoft.frama.io/mobilizon/backend/Mobilizon.Service.Geospatial.Provider.html), so feel free to write your own!
|
|
@ -1,13 +0,0 @@
|
|||
# Configuration
|
||||
|
||||
Basic Mobilizon configuration can be handled through the Admin panel in the UI.
|
||||
|
||||
Core mobilizon configuration must be managed into the `config/prod.secret.exs` file.
|
||||
After performing changes to this file, you have to recompile the mobilizon app with:
|
||||
```bash
|
||||
MIX_ENV=prod mix compile
|
||||
```
|
||||
and then restart the Mobilizon service:
|
||||
```
|
||||
systemctl restart mobilizon
|
||||
```
|
|
@ -1,122 +0,0 @@
|
|||
# Dependencies
|
||||
|
||||
## Debian / Ubuntu and derivatives
|
||||
|
||||
This documentation is appropriate for Debian 10 (Buster) and Ubuntu 18.04 LTS.
|
||||
|
||||
### Security
|
||||
|
||||
We advise to make sure your webserver is secure enough.
|
||||
For instance you can require authentication through SSH keys and not passwords, install Fail2Ban to block repeated login attempts and block unused ports by installing and configuring a firewall.
|
||||
|
||||
### Upgrade system
|
||||
|
||||
Just to be sure your system is up-to-date before doing anything else:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt dist-upgrade
|
||||
```
|
||||
|
||||
### Basic tools
|
||||
We begin by making sure some basic tools are installed:
|
||||
|
||||
```bash
|
||||
sudo apt install build-essential curl unzip vim openssl git cmake
|
||||
```
|
||||
|
||||
### Web server
|
||||
We only officially support nginx.
|
||||
|
||||
```bash
|
||||
sudo apt install nginx
|
||||
```
|
||||
|
||||
### HTTPS Certificates
|
||||
Then we need to install [certbot](https://certbot.eff.org/), a tool to ask for free Let's Encrypt HTTPS certificates.
|
||||
|
||||
```bash
|
||||
sudo apt install certbot
|
||||
```
|
||||
|
||||
You can use certbot with web server plugins or manually. See [Certbot's documentation](https://certbot.eff.org/instructions).
|
||||
|
||||
|
||||
### NodeJS
|
||||
We install the latest NodeJS version by adding NodeSource repos and installing NodeJS:
|
||||
|
||||
Head over to [this page](https://github.com/nodesource/distributions/blob/master/README.md#table-of-contents) and follow the instructions for `Node.js v12.x`.
|
||||
|
||||
!!! info
|
||||
Unless stated otherwise, Mobilizon always supports only the latest LTS version of NodeJS.
|
||||
|
||||
!!! tip
|
||||
NodeSource repos only gives updates for a specific version of NodeJS (it doesn't upgrade itself to a new major version). When a new major version of NodeJS is released, you need to remove the old repo and add the new one.
|
||||
|
||||
### Yarn
|
||||
Mobilizon uses [Yarn](https://yarnpkg.com/) to manage NodeJS packages, so we need to install it as well.
|
||||
|
||||
Follow the instructions on [this page](https://yarnpkg.com/en/docs/install#debian-stable) to add Yarn's repository and install it.
|
||||
|
||||
!!! info
|
||||
It is also possible to install `yarn` directly with `npm`:
|
||||
```bash
|
||||
npm install -g yarn
|
||||
```.
|
||||
You need to make sure npm's binary packages folder in your `$PATH` afterwards to use `yarn`.
|
||||
|
||||
### Erlang and Elixir
|
||||
|
||||
The packages from Debian or Ubuntu are badly packaged and often out of date, so we need to add one final source repository.
|
||||
|
||||
Follow the instructions for Ubuntu/Debian on [this page](https://elixir-lang.org/install.html#unix-and-unix-like) to add Erlang Solutions repo and install Erlang and Elixir.
|
||||
|
||||
!!! tip
|
||||
The Erlang package also wants to install an add-on for Emacs for some reason (but it doesn't install Emacs). If you see a warning, nothing to worry about.
|
||||
|
||||
### PostgreSQL and PostGIS
|
||||
|
||||
Mobilizon uses the [PostgreSQL](https://www.postgresql.org) database, and the PostgreSQL [Postgis](https://postgis.net) extension to store geographical data into PostgreSQL.
|
||||
|
||||
```bash
|
||||
sudo apt install postgresql postgresql-contrib postgis
|
||||
```
|
||||
|
||||
After that we can enable and start the PostgreSQL service.
|
||||
```
|
||||
sudo systemctl --now enable postgresql
|
||||
```
|
||||
|
||||
### Misc
|
||||
|
||||
We need the following tools to handle and optimize pictures that are uploaded on Mobilizon.
|
||||
|
||||
```bash
|
||||
sudo apt install imagemagick
|
||||
```
|
||||
|
||||
The following packages are optional, Mobilizon can run without them.
|
||||
|
||||
```bash
|
||||
sudo apt install webp gifsicle jpegoptim optipng pngquant
|
||||
```
|
||||
|
||||
Once finished, let's [head back to the install guide](index.md).
|
||||
|
||||
## Arch Linux
|
||||
|
||||
Run the following command to install all at once:
|
||||
```bash
|
||||
sudo pacman -S nodejs postgresql openssl git wget unzip base-devel yarn nginx elixir postgis imagemagick
|
||||
```
|
||||
|
||||
Now that dependencies are installed, before running Mobilizon you should start PostgreSQL:
|
||||
```
|
||||
sudo systemctl --now enable postgresql
|
||||
```
|
||||
|
||||
Once finished, let's [head back to the install guide](index.md).
|
||||
|
||||
## Other distributions
|
||||
|
||||
Feel free to update this file in a pull request!
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
title: FAQ
|
||||
---
|
||||
|
||||
# FAQ
|
||||
|
||||
## Should I have a big server to run Mobilizon?
|
||||
|
||||
|
||||
Not really. Being written in Elixir, Mobilizon doesn't need much resources once it's running. If you plan to open your instance to the public, plan in advance higher values for the following given requirements.
|
||||
|
||||
!!! note
|
||||
If you plan to self-host a address/geocoding server as well, [the requirements are quite on another level](./configure/geocoders.md).
|
||||
|
||||
<dl>
|
||||
<dt>CPU</dt>
|
||||
<dd><b>One should be enough</b>
|
||||
<p>Depending on your number of users and instances you federate with, extra CPUs will be helpful.</p>
|
||||
</dd>
|
||||
|
||||
<dt>RAM</dt>
|
||||
<dd>
|
||||
<b>512MB should be enough for Mobilizon, Nginx and PostgreSQL</b>
|
||||
<p>Mobilizon will use at least around ~256MB and PostgreSQL and nginx can use ~20MB. Extra memory can improve tasks like compiling and building dependencies.</p>
|
||||
</dd>
|
||||
|
||||
<dt>Storage</dt>
|
||||
<dd><b>Depends how many users and events you have</b>
|
||||
<p>A little space will be needed for Mobilizon and it's dependencies (damn you <code>node_modules</code>) themselves. Otherwise, storage usage will grow mostly with user's profile pics and pictures associated to events. Also the PostgreSQL database can start to weigh a bit after a while, depending on how many events you create and how many other instances you follow.</p>
|
||||
</dd>
|
||||
|
||||
<dt>Bandwidth</dt>
|
||||
<dd>Any bandwidth will do, but higher numbers will improve the experience for users and will help federation.</dd>
|
||||
</dl>
|
|
@ -1,279 +0,0 @@
|
|||
# Install
|
||||
|
||||
!!! info "Docker"
|
||||
|
||||
Docker production installation is not yet supported. See [issue #352](https://framagit.org/framasoft/mobilizon/issues/352).
|
||||
|
||||
## Pre-requisites
|
||||
|
||||
* A Linux machine with **root access**
|
||||
* A **domain name** (or subdomain) for the Mobilizon server, e.g. `your-mobilizon-domain.com`
|
||||
* An **SMTP server** to deliver emails
|
||||
|
||||
## Dependencies
|
||||
|
||||
Mobilizon requires Elixir, NodeJS and PostgreSQL among other things. Prefer to install Elixir and NodeJS from their official repositories instead of your distribution's packages.
|
||||
|
||||
Recommended versions:
|
||||
|
||||
* Elixir 1.8+
|
||||
* NodeJS 12+
|
||||
* PostgreSQL 11+
|
||||
|
||||
!!! important
|
||||
Installing dependencies depends on the system you're using. Follow the steps of the [dependencies guide](dependencies.md) and come back to this page when done.
|
||||
|
||||
## Setup
|
||||
|
||||
We're going to use a dedicated `mobilizon` user with `/home/mobilizon` home:
|
||||
```bash
|
||||
sudo adduser --disabled-login mobilizon
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
On FreeBSD
|
||||
|
||||
``` bash
|
||||
sudo pw useradd -n mobilizon -d /home/mobilizon -s /usr/local/bin/bash -m
|
||||
sudo passwd mobilizon
|
||||
```
|
||||
|
||||
Then let's connect as this user:
|
||||
|
||||
```bash
|
||||
sudo -i -u mobilizon
|
||||
```
|
||||
|
||||
Let's start by cloning the repository in a directory named `live`:
|
||||
|
||||
```bash
|
||||
git clone https://framagit.org/framasoft/mobilizon live && cd live
|
||||
```
|
||||
|
||||
|
||||
## Installing dependencies
|
||||
|
||||
Install Elixir dependencies
|
||||
|
||||
```bash
|
||||
mix deps.get
|
||||
```
|
||||
|
||||
!!! note
|
||||
When asked for `Shall I install Hex?` or `Shall I install rebar3?`, hit the enter key to confirm.
|
||||
|
||||
Then compile these dependencies and Mobilizon (this can take a few minutes, and can output all kinds of warnings, such as depreciation issues)
|
||||
|
||||
```bash
|
||||
MIX_ENV=prod mix compile
|
||||
```
|
||||
|
||||
Go into the `js/` directory
|
||||
|
||||
```bash
|
||||
cd js
|
||||
```
|
||||
|
||||
and install the Javascript dependencies
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
```
|
||||
|
||||
Finally, we can build the front-end (this can take a few seconds).
|
||||
|
||||
!!! warning
|
||||
Building front-end can consume up to 2048MB of RAM by default. If it's too much or not sufficient for your setup, you can adjust the maximum memory used by prefixing the command with the following option:
|
||||
```
|
||||
NODE_BUILD_MEMORY=1024
|
||||
```
|
||||
```bash
|
||||
yarn run build
|
||||
```
|
||||
|
||||
Let's go back to the main directory
|
||||
```bash
|
||||
cd ../
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Mobilizon provides a command line tool to generate configuration
|
||||
|
||||
```bash
|
||||
MIX_ENV=prod mix mobilizon.instance gen
|
||||
```
|
||||
|
||||
This will ask you questions about your setup and your instance to generate a `prod.secret.exs` file in the `config/` folder, and a `setup_db.psql` file to setup the database.
|
||||
|
||||
### Database setup
|
||||
|
||||
The `setup_db.psql` file contains SQL instructions to create a PostgreSQL user and database with the chosen credentials and add the required extensions to the Mobilizon database.
|
||||
|
||||
Exit running as the mobilizon user (as it shouldn't have `root`/`sudo` rights) and execute in the `/home/mobilizon/live` directory:
|
||||
```bash
|
||||
sudo -u postgres psql -f setup_db.psql
|
||||
```
|
||||
|
||||
It should output something like:
|
||||
```
|
||||
CREATE ROLE
|
||||
CREATE DATABASE
|
||||
You are now connected to database "mobilizon_prod" as user "postgres".
|
||||
CREATE EXTENSION
|
||||
CREATE EXTENSION
|
||||
CREATE EXTENSION
|
||||
```
|
||||
|
||||
Let's get back to our `mobilizon` user:
|
||||
```bash
|
||||
sudo -i -u mobilizon
|
||||
cd live
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
When it's done, don't forget to remove the `setup_db.psql` file.
|
||||
|
||||
### Database Migration
|
||||
|
||||
Run database migrations:
|
||||
```bash
|
||||
MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
Note the `MIX_ENV=prod` environment variable prefix in front of the command. You will have to use it for each `mix` command from now on.
|
||||
|
||||
You will have to do this again after most updates.
|
||||
|
||||
!!! tip
|
||||
If some migrations fail, it probably means you're not using a recent enough version of PostgreSQL, or that you haven't installed the required extensions.
|
||||
|
||||
## Services
|
||||
|
||||
We can quit using the `mobilizon` user again.
|
||||
|
||||
### Systemd
|
||||
|
||||
Copy the `support/systemd/mobilizon.service` to `/etc/systemd/system`.
|
||||
|
||||
```bash
|
||||
sudo cp support/systemd/mobilizon.service /etc/systemd/system/
|
||||
```
|
||||
|
||||
Reload Systemd to detect your new file
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
And enable the service
|
||||
|
||||
```bash
|
||||
sudo systemctl enable --now mobilizon.service
|
||||
```
|
||||
|
||||
It will run Mobilizon and enable startup on boot. You can follow the logs with
|
||||
|
||||
```bash
|
||||
sudo journalctl -fu mobilizon.service
|
||||
```
|
||||
|
||||
You should see something like this:
|
||||
```
|
||||
Running Mobilizon.Web.Endpoint with cowboy 2.8.0 at :::4000 (http)
|
||||
Access Mobilizon.Web.Endpoint at https://your-mobilizon-domain.com
|
||||
```
|
||||
|
||||
The Mobilizon server runs on port 4000 on the local interface only, so you need to add a reverse-proxy.
|
||||
|
||||
## Reverse proxy
|
||||
|
||||
### Nginx
|
||||
|
||||
Copy the file from `support/nginx/mobilizon.conf` to `/etc/nginx/sites-available`.
|
||||
|
||||
```bash
|
||||
sudo cp support/nginx/mobilizon.conf /etc/nginx/sites-available
|
||||
```
|
||||
|
||||
Then symlink the file into the `/etc/nginx/sites-enabled` directory.
|
||||
|
||||
```bash
|
||||
sudo ln -s /etc/nginx/sites-available/mobilizon.conf /etc/nginx/sites-enabled/
|
||||
```
|
||||
|
||||
Edit the file `/etc/nginx/sites-available/mobilizon.conf` and adapt it to your own configuration.
|
||||
|
||||
Test the configuration with `sudo nginx -t` and reload nginx with `sudo systemctl reload nginx`.
|
||||
|
||||
### Let's Encrypt
|
||||
|
||||
The nginx configuration template handles the HTTP-01 challenge with the webroot plugin:
|
||||
```bash
|
||||
sudo mkdir /var/www/certbot
|
||||
```
|
||||
|
||||
Run certbot with (don't forget to adapt the command)
|
||||
```bash
|
||||
sudo certbot certonly --rsa-key-size 4096 --webroot -w /var/www/certbot/ --email your@email.com --agree-tos --text --renew-hook "/usr/sbin/nginx -s reload" -d your-mobilizon-domain.com
|
||||
```
|
||||
|
||||
Then adapt the nginx configuration `/etc/nginx/sites-available/mobilizon.conf` by uncommenting certificate paths and removing obsolete blocks.
|
||||
|
||||
Finish by testing the configuration with `sudo nginx -t` and reloading nginx with `sudo systemctl reload nginx`.
|
||||
|
||||
You should now be able to load https://your-mobilizon-domain.com inside your browser.
|
||||
|
||||
## Creating your first user
|
||||
|
||||
Login back as the `mobilizon` system user:
|
||||
|
||||
```bash
|
||||
sudo -i -u mobilizon
|
||||
cd live
|
||||
```
|
||||
|
||||
Create a new user:
|
||||
```
|
||||
MIX_ENV=prod mix mobilizon.users.new "your@email.com" --admin --password "Y0urP4ssw0rd"
|
||||
```
|
||||
|
||||
!!! danger
|
||||
Don't forget to prefix the command with an empty space so that the chosen password isn't kept in your shell history.
|
||||
|
||||
!!! tip
|
||||
You can ignore the `--password` option and Mobilizon will generate one for you.
|
||||
|
||||
See the [full documentation](./CLI tasks/manage_users.md#create-a-new-user) for this command.
|
||||
|
||||
You may now login with your credentials and discover Mobilizon. Feel free to explore [configuration documentation](./configure) as well.
|
||||
|
||||
## Suggested tasks
|
||||
|
||||
### Configure emails
|
||||
|
||||
The default Mobilizon configuration assumes a local SMTP server is available on the same server. To tweak this for your own setup, [see this page](configure/email.md).
|
||||
|
||||
### Configure 3rd-party auth
|
||||
|
||||
Mobilizon can use LDAP or OAuth-based login providers (Facebook, Google, etc.) to help register or login users. Configuration [can be found here](configure/auth.md).
|
||||
|
||||
### Configure geocoders
|
||||
|
||||
This will allow the address autocomplete field to provide addresses when editing an event. The default value uses OpenStreetMap's Nominatim provider but you can [change it to the provider of your choice](configure/geocoders.md).
|
||||
|
||||
!!! note
|
||||
When using the default OpenStreetMap's Nominatim provider, autocomplete is disabled and using the service implies that you accept [their Usage Policy](https://operations.osmfoundation.org/policies/nominatim/).
|
||||
|
||||
|
||||
### Geolocation databases
|
||||
|
||||
Mobilizon can use geolocation from MMDB format data from sources like [MaxMind GeoIP](https://dev.maxmind.com/geoip/geoip2/geolite2/) databases or [db-ip.com](https://db-ip.com/db/download/ip-to-city-lite) databases. This allows showing events happening near the user's location.
|
||||
|
||||
You will need to download the City database and put it into `priv/data/GeoLite2-City.mmdb`. Finish by restarting the `mobilizon` service.
|
||||
|
||||
Mobilizon will only show a warning at startup if the database is missing, but it isn't required.
|
|
@ -1,96 +0,0 @@
|
|||
---
|
||||
title: Upgrading to a new release
|
||||
---
|
||||
|
||||
# Preparing
|
||||
|
||||
The release page contains a changelog, and below it, upgrade instructions. **Read and understand** the release instructions.
|
||||
|
||||
Some tasks (like database migrations) can take a while, so we advise you to run commands inside a `tmux` or `screen`.
|
||||
|
||||
# Backup
|
||||
|
||||
Always make sure your database and `config` folder are properly backuped before performing upgrades.
|
||||
|
||||
Unless stated otherwise in the release notes, the following steps are enough to upgrade Mobilizon.
|
||||
|
||||
# Steps
|
||||
|
||||
### Fetch latest code
|
||||
Switch to the `mobilizon` user:
|
||||
|
||||
```bash
|
||||
sudo -i -u mobilizon
|
||||
```
|
||||
|
||||
And navigate to the Mobilizon root directory:
|
||||
|
||||
```bash
|
||||
cd /home/mobilizon/live
|
||||
```
|
||||
|
||||
Fetch the latest tags
|
||||
```bash
|
||||
git fetch --tags
|
||||
```
|
||||
|
||||
And checkout the tag you want to switch to. For instance, if I want to upgrade to version `v1.1`:
|
||||
```bash
|
||||
git checkout v1.1
|
||||
```
|
||||
|
||||
### Fetch new dependencies
|
||||
Fetch new and/or updated Elixir and NodeJS dependencies
|
||||
```bash
|
||||
MIX_ENV=prod mix deps.get
|
||||
```
|
||||
```bash
|
||||
cd js
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Rebuild Mobilizon's front-end
|
||||
!!! warning
|
||||
Building front-end can consume up to 2048MB of RAM by default. If it's too much or not sufficient for your setup, you can adjust the maximum memory used by prefixing the command with the following option:
|
||||
```
|
||||
NODE_BUILD_MEMORY=1024
|
||||
```
|
||||
```bash
|
||||
yarn run build
|
||||
cd ../
|
||||
```
|
||||
|
||||
### Recompile Mobilizon
|
||||
```bash
|
||||
MIX_ENV=prod mix compile
|
||||
```
|
||||
Let's switch back to your regular user.
|
||||
|
||||
### Stop running Mobilizon processes
|
||||
```bash
|
||||
sudo systemctl stop mobilizon
|
||||
```
|
||||
|
||||
### Perform database migrations
|
||||
|
||||
Go back to the `mobilizon` user.
|
||||
```bash
|
||||
sudo -i -u mobilizon
|
||||
cd live
|
||||
MIX_ENV=prod mix ecto.migrate
|
||||
```
|
||||
### Restart Mobilizon
|
||||
Let's switch back one last time to your regular user.
|
||||
```bash
|
||||
sudo systemctl restart mobilizon
|
||||
```
|
||||
|
||||
You can follow the Mobilizon logs to check that everything works properly.
|
||||
```bash
|
||||
sudo journalctl -u mobilizon -f
|
||||
```
|
||||
|
||||
**That’s all!** You’re running the new version of Mobilizon now.
|
||||
|
||||
If you have issues after upgrading, try reviewing upgrade steps and release notes.
|
||||
Then feel free to [contact us](../about.md#discuss) or file an issue on [our Gitlab](https://framagit.org/framasoft/mobilizon/issues)
|
|
@ -1,251 +0,0 @@
|
|||
# Federation
|
||||
|
||||
## ActivityPub
|
||||
|
||||
Mobilizon uses [ActivityPub](http://activitypub.rocks/) to federate content between instances. It only supports the server-to-server part of [the ActivityPub spec](https://www.w3.org/TR/activitypub/).
|
||||
|
||||
It implements the [HTTP signatures spec](https://tools.ietf.org/html/draft-cavage-http-signatures-12) for authentication of inbox deliveries, but doesn't implement Linked Data Signatures for forwarded payloads, and instead fetches content when needed.
|
||||
|
||||
To match usernames to actors, Mobilizon uses [WebFinger](https://tools.ietf.org/html/rfc7033).
|
||||
|
||||
## Instance subscriptions
|
||||
|
||||
Instances subscribe to each other through an internal actor named `relay@instance.tld` that publishes (through `Announce`) every created content to it's followers. Each content creation share is saved so that updates and deletes are correctly sent to every relay subscriber.
|
||||
|
||||
## Activities
|
||||
|
||||
Supported Activity | Supported Object or Activity
|
||||
------------ | -------------
|
||||
`Accept` | `Follow`, `Join`
|
||||
`Add` | `Document`, `ResourceCollection`
|
||||
`Announce` | any `Object`
|
||||
`Create` | any `Object`
|
||||
`Delete` | any `Object`
|
||||
`Flag` | any `Object`
|
||||
`Follow` | any `Object`
|
||||
`Invite` | `Group`
|
||||
`Join` | `Event`
|
||||
`Leave` | `Event`, `Group`
|
||||
`Move` | `Document`, `ResourceCollection`
|
||||
`Reject` | `Follow`, `Join`
|
||||
`Remove` | `Note`, `Event`, `Member`
|
||||
`Undo` | `Announce`, `Follow`
|
||||
`Update` | `Object`
|
||||
|
||||
## Objects
|
||||
|
||||
### Person
|
||||
|
||||
Every Mobilizon profile is a [`Person`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person).
|
||||
|
||||
### Event
|
||||
|
||||
Every Mobilizon event is an [`Event`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event) with [a few extensions](#event_1), especially for location information since [`Place`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place) is limited.
|
||||
|
||||
### Note
|
||||
|
||||
Every Mobilizon comment showing under an event is a [`Note`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note), as well as every element from group discussions, where the [`context` property](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-context) is used to group messages in discussions.
|
||||
|
||||
### Group
|
||||
|
||||
Every Mobilizon group is a [`Group`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group).
|
||||
|
||||
### Member
|
||||
|
||||
Every Mobilizon group member is a `Member`, that conveys the role information that the `Person` has in the `Group`.
|
||||
|
||||
```json
|
||||
%{
|
||||
"type" => "Member",
|
||||
"id" => "https://somemobilizon.instance/member/some-uuid",
|
||||
"actor" => "https://somemobilizon.instance/@some-person",
|
||||
"object" => "https://somemobilizon.instance/@some-group",
|
||||
"role" => "MODERATOR"
|
||||
}
|
||||
```
|
||||
|
||||
The allowed values for `role` are: `invited`, `not_approved`, `member`, `moderator`, `administrator`, `rejected`.
|
||||
|
||||
### Document
|
||||
|
||||
Attached pictures and other files are represented with [`Document`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-document).
|
||||
|
||||
Group resources are also represented with `Document`.
|
||||
|
||||
### Article
|
||||
|
||||
Every Mobilizon group post is an [Article](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article).
|
||||
|
||||
### ResourceCollection
|
||||
|
||||
Mobilizon's group resources (see [Document](#Document)) can be collected into folders named `ResourceCollection`, which have the same set of properties as a `Document`, without the `url`.
|
||||
|
||||
|
||||
## Extensions
|
||||
|
||||
### Event
|
||||
|
||||
The vocabulary for Event is based on [the Event object in ActivityStreams](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event), extended with :
|
||||
|
||||
* the [Event Schema](https://schema.org/Event) from Schema.org
|
||||
* some properties from [iCalendar](https://tools.ietf.org/html/rfc5545), such as `ical:status` (see [this issue](https://framagit.org/framasoft/mobilizon/issues/320))
|
||||
|
||||
The following properties are added.
|
||||
|
||||
#### repliesModeration
|
||||
|
||||
Disabling replies is [an ongoing issue with ActivityPub](https://github.com/w3c/activitypub/issues/319) so we use a temporary property.
|
||||
|
||||
See [the corresponding issue](https://framagit.org/framasoft/mobilizon/issues/321).
|
||||
|
||||
Accepted values: `allow_all`, `closed`, `moderated` (not used at the moment)
|
||||
|
||||
!!! info
|
||||
We also support PeerTube's `commentEnabled` property as a fallback. It is set to `true` only when `repliesModeration` is equal to `allow_all`.
|
||||
|
||||
Example:
|
||||
```json
|
||||
{
|
||||
"@context": [
|
||||
"...",
|
||||
{
|
||||
"mz": "https://joinmobilizon.org/ns#",
|
||||
"pt": "https://joinpeertube.org/ns#",
|
||||
"repliesModerationOption": {
|
||||
"@id": "mz:repliesModerationOption",
|
||||
"@type": "mz:repliesModerationOptionType"
|
||||
},
|
||||
"repliesModerationOptionType": {
|
||||
"@id": "mz:repliesModerationOptionType",
|
||||
"@type": "rdfs:Class"
|
||||
},
|
||||
"commentsEnabled": {
|
||||
"@id": "pt:commentsEnabled",
|
||||
"@type": "sc:Boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"...": "...",
|
||||
"repliesModerationOption": "allow_all",
|
||||
"commentsEnabled": true,
|
||||
"type": "Event",
|
||||
"url": "http://mobilizon1.com/events/8cf76e9f-c426-4912-9cd6-c7030b969611"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### joinMode
|
||||
|
||||
Indicator of how new members may be able to join.
|
||||
|
||||
See [the corresponding issue](https://framagit.org/framasoft/mobilizon/issues/321).
|
||||
|
||||
Accepted values: `free`, `restricted`, `invite` (not used at the moment)
|
||||
|
||||
Example:
|
||||
```json
|
||||
{
|
||||
"@context": [
|
||||
"...",
|
||||
{
|
||||
"mz": "https://joinmobilizon.org/ns#",
|
||||
"joinMode": {
|
||||
"@id": "mz:joinMode",
|
||||
"@type": "mz:joinModeType"
|
||||
},
|
||||
"joinModeType": {
|
||||
"@id": "mz:joinModeType",
|
||||
"@type": "rdfs:Class"
|
||||
}
|
||||
}
|
||||
],
|
||||
"...": "...",
|
||||
"joinMode": "restricted",
|
||||
"type": "Event",
|
||||
"url": "http://mobilizon1.com/events/8cf76e9f-c426-4912-9cd6-c7030b969611"
|
||||
}
|
||||
```
|
||||
|
||||
#### location
|
||||
|
||||
We use Schema.org's `location` property on `Event`.
|
||||
[The ActivityStream vocabulary to represent places](https://www.w3.org/TR/activitystreams-vocabulary/#places) is quite limited so instead of just using `Place` from ActivityStreams we also add a few properties from Schema.org's `Place` vocabulary.
|
||||
|
||||
We add [an `address` property](https://schema.org/address), which we assume to be [of `PostalAddress` type](https://schema.org/PostalAddress).
|
||||
|
||||
```json
|
||||
{
|
||||
"@context": [
|
||||
"...",
|
||||
{
|
||||
"PostalAddress": "sc:PostalAddress",
|
||||
"address": {
|
||||
"@id": "sc:address",
|
||||
"@type": "sc:PostalAddress"
|
||||
},
|
||||
"addressCountry": "sc:addressCountry",
|
||||
"addressLocality": "sc:addressLocality",
|
||||
"addressRegion": "sc:addressRegion",
|
||||
"postalCode": "sc:postalCode",
|
||||
"sc": "http://schema.org#",
|
||||
"streetAddress": "sc:streetAddress",
|
||||
}
|
||||
],
|
||||
"id": "http://mobilizon2.com/events/945f350d-a3e6-4bcd-9bf2-0bd2e4d353c5",
|
||||
"location": {
|
||||
"address": {
|
||||
"addressCountry": "France",
|
||||
"addressLocality": "Lyon",
|
||||
"addressRegion": "Auvergne-Rhône-Alpes",
|
||||
"postalCode": "69007",
|
||||
"streetAddress": "10 Rue Jangot",
|
||||
"type": "PostalAddress"
|
||||
},
|
||||
"latitude": 4.8425657,
|
||||
"longitude": 45.7517141,
|
||||
"id": "http://mobilizon2.com/address/bdf7fb53-7177-46f3-8fb3-93c25a802522",
|
||||
"name": "10 Rue Jangot",
|
||||
"type": "Place"
|
||||
},
|
||||
"type": "Event"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### maximumAttendeeCapacity
|
||||
|
||||
We use Schema.org's [`maximumAttendeeCapacity`](https://schema.org/maximumAttendeeCapacity) to know how many places there can be for an event.
|
||||
|
||||
#### anonymousParticipationEnabled
|
||||
|
||||
We add this boolean field to know whether or not anonymous participants can participate to an event.
|
||||
|
||||
!!! note
|
||||
Even though this information is federated, we redirect anonymous participants to the original instance so they can participate.
|
||||
|
||||
### Join
|
||||
|
||||
#### participationMessage
|
||||
|
||||
We add a `participationMessage` property on a `Join` activity so that participants may transmit a note to event organizers, to motivate their participation when event participations are manually approved. This field is restricted to plain text.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "Join",
|
||||
"object": "http://mobilizon.test/events/some-uuid",
|
||||
"id": "http://mobilizon2.test/@admin/join/event/1",
|
||||
"actor": "http://mobilizon2.test/@admin",
|
||||
"participationMessage": "I want to join !",
|
||||
"@context": [
|
||||
{
|
||||
"participationMessage": {
|
||||
"@id": "mz:participationMessage",
|
||||
"@type": "sc:Text"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
|
@ -1,47 +0,0 @@
|
|||
# Code of Conduct
|
||||
|
||||
This section explains Framasoft's commitment towards contributors to the [Mobilizon Project](https://joinmobilizon.org), as well as expectations that community members should have of one another. It is based on the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct) v1.4.
|
||||
|
||||
## Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers - including Framasoft - pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
We also follow the [Post-Meritocracy Manifesto](https://postmeritocracy.org).
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behaviour that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behaviour by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others’ private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
The Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
||||
Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at tcit plus mobilizon at framasoft dot org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
|
||||
|
||||
---
|
|
@ -1,88 +0,0 @@
|
|||
# Development
|
||||
|
||||
Clone the repository:
|
||||
|
||||
=== "HTTPS"
|
||||
``` bash
|
||||
git clone https://framagit.org/framasoft/mobilizon && cd mobilizon
|
||||
```
|
||||
|
||||
=== "SSH"
|
||||
``` bash
|
||||
git clone git@framagit.org:framasoft/mobilizon.git && cd mobilizon
|
||||
```
|
||||
|
||||
Run Mobilizon:
|
||||
|
||||
+ with Docker and Docker-Compose (**Recommended**)
|
||||
+ without Docker and Docker-Compose (This involves more work on your part, use Docker and Docker-Compose if you can)
|
||||
|
||||
## With Docker
|
||||
|
||||
+ Install [Docker](https://docs.docker.com/install/#supported-platforms) and [Docker-Compose](https://docs.docker.com/compose/install/) for your system.
|
||||
+ Run `make start` to build, then launch a database container and an API container.
|
||||
+ Follow the progress of the build with `docker-compose logs -f` .
|
||||
+ Access `localhost:4000` in your browser once the containers are fully built and launched.
|
||||
|
||||
## Without Docker
|
||||
|
||||
+ Install dependencies:
|
||||
- [Elixir (and Erlang)](https://elixir-lang.org/install.html)
|
||||
- PostgreSQL >= 9.6 with PostGIS
|
||||
- [Install NodeJS](https://nodejs.org/en/download/) (we guarantee support for the latest LTS and later) ![](https://img.shields.io/badge/node-%3E%3D%2012.0+-brightgreen.svg)
|
||||
+ Start services:
|
||||
- Start postgres
|
||||
+ Setup services:
|
||||
- Make sure the postgis extension is installed on your system.
|
||||
- Create a postgres user with database creation capabilities, using the
|
||||
|
||||
following: `createuser -d -P mobilizon` and set `mobilizon` as the password.
|
||||
|
||||
+ Install packages
|
||||
- Fetch backend Elixir dependencies with `mix deps.get` .
|
||||
- Go into the `cd js` directory, `yarn install` and then back `cd ../`
|
||||
+ Setup
|
||||
- Create your database with `mix ecto.create` .
|
||||
- Create the postgis extension on the database with a postgres user that has
|
||||
|
||||
superuser capabilities: `psql mobilizon_dev`
|
||||
```psql
|
||||
create extension if not exists postgis;
|
||||
```
|
||||
|
||||
* Run migrations: `mix ecto.migrate`.
|
||||
* Generate a Guardian secret with `mix guardian.gen.secret`:
|
||||
```bash
|
||||
$ mix guardian.gen.secret
|
||||
$ TTRcgYH/Y0rk8ph5fqExVWRWjK03cqymfTa70leljmLMsBChtm+6MM+pRrL76Io3
|
||||
```
|
||||
* Create a `config/dev.secret.exs` file and add the Guardian config:
|
||||
|
||||
```elixir
|
||||
import Config
|
||||
|
||||
config :mobilizon, Mobilizon.Web.Auth.Guardian,
|
||||
secret_key: "TTRcgYH/Y0rk8ph5fqExVWRWjK03cqymfTa70leljmLMsBChtm+6MM+pRrL76Io3"
|
||||
|
||||
```
|
||||
|
||||
* Generate your first user with the `mix mobilizon.users.new` task
|
||||
|
||||
```bash
|
||||
$ mix mobilizon.users.new john.doe@localhost.com --admin
|
||||
An user has been created with the following information:
|
||||
- email: john.doe@localhost.com
|
||||
- password: r/EKpKr5o7ngQY+r
|
||||
- Role: user
|
||||
The user will be prompted to create a new profile after login for the first time.
|
||||
```
|
||||
|
||||
* Start Phoenix endpoint with `mix phx.server`. The client development server will also automatically be launched and will reload on file change.
|
||||
Now you can visit [ `localhost:4000` ](http://localhost:4000) in your browser
|
||||
and see the website (server *and* client) in action.
|
||||
|
||||
## FAQ
|
||||
|
||||
### Issues with argon2 when creating users.
|
||||
|
||||
This is because you installed deps through Docker and are now using Mobilizon without it, or the other way around. Just `rm -r deps/argon2_elixir` and trigger `mix deps.get` again.
|
|
@ -1,265 +0,0 @@
|
|||
# Contributing to Mobilizon
|
||||
|
||||
---
|
||||
|
||||
## How we collaborate
|
||||
|
||||
First off, thank you for considering contributing to Mobilizon!
|
||||
|
||||
Our aim for this project is to make you feel welcome as a contributor.
|
||||
We hugely value the comments and contributions of community members in the various
|
||||
publicly-accessible areas in use, which currently are:
|
||||
|
||||
* Home: [Home](https://joinmobilizon.org)
|
||||
* Wiki: [Project Wiki](https://framagit.org/framasoft/mobilizon/wikis) (GitLab)
|
||||
* Code: [Framagit](https://framagit.org/framasoft/mobilizon) (GitLab)
|
||||
* Issue tracking: [Framagit](https://framagit.org/framasoft/mobilizon) (GitLab)
|
||||
* Discussion: [Mobilizon forum](https://framacolibri.org/c/mobilizon) (Discourse)
|
||||
* Chat: [#Mobilizon:matrix.org](https://matrix.org/#/room/#Mobilizon:matrix.org) (Matrix) or `#mobilizon` on Freenode (IRC)
|
||||
|
||||
### How to communicate with others ?
|
||||
|
||||
As you may know, English is not the only language in the community and communicating in various languages can be quite tricky. Some might not understand what you're saying, while others have a hard time writing in a language that is not their primary language.
|
||||
|
||||
If you haven't noticed yet, French is the de-facto language for communication in various channels. This is because a huge part of our community speaks French, as Framasoft is a French organization.
|
||||
|
||||
We don't want to impose French as the only language in the project, though, because we would lose a ton of potential users and contributors that can help us make Mobilizon better.
|
||||
|
||||
You can write what you would like to tell us in the language you're most comfortable with and then use automagic translation to translate your message in English. It's far from perfect, but if we can understand the main idea you wanted to expose, it's sufficient.
|
||||
|
||||
Of course, you can and should express yourself directly in English if you're confident doing so!
|
||||
|
||||
### Other useful information
|
||||
|
||||
* It's early days for Mobilizon, so we're focused on laying down the foundations for the project. This means that you won't find much usable code yet.
|
||||
* We're working as openly and transparently as possible with this project. As a contributor or member of the Mobilizon community, almost everything you come across will link to some other things that you should have access to. If you don't have access, and you think you should, just ask!
|
||||
|
||||
### Contributopia
|
||||
|
||||
This project is part of [Framasoft](https://framasoft.org)'s [Contributopia Campaign](https://contributopia.org), creating and offering tools designed with a different set of values.
|
||||
|
||||
![Framameet illustration on Contributopia Website](https://contributopia.org/img/services-framameet.jpg)
|
||||
|
||||
---
|
||||
|
||||
## [Code Of Conduct](code_of_conduct.md)
|
||||
|
||||
We require all participants to read and accept our [Code of Conduct](code_of_conduct.md).
|
||||
|
||||
---
|
||||
|
||||
## How Can I Contribute
|
||||
|
||||
### Submitting Feature Requests, Enhancement Suggestions or Bug Reports
|
||||
|
||||
This section guides you through submitting a ✨ feature request, 💄 enhancement suggestions, and 🐛 bug reports for Mobilizon - anything from errors and crashes, to minor improvements, to completely new features.
|
||||
|
||||
When you post an issue, please include as many details as possible. **Fill in the issue template** (available below) to help us resolve issues faster.
|
||||
|
||||
### Before making a submission
|
||||
|
||||
Please go through the checklist below before posting any ✨ 💄 🐛
|
||||
|
||||
* **Check if you're using the latest version** of Mobilizon and all its relevant components and if you can get the desired behaviour by changing some config settings.
|
||||
* **Perform a cursory search** in the issue tracker to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
* Never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead, sensitive bugs must be sent by email to tcit plus mobilizon at framasoft dot org.
|
||||
|
||||
!!! note
|
||||
If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
|
||||
|
||||
### Suggesting Features & Enhancements
|
||||
|
||||
If you find yourself wishing for a feature that doesn't exist in Mobilizon, you are probably not alone. There are probably others out there with similar needs.
|
||||
|
||||
Open an issue providing the following information:
|
||||
|
||||
* **Use a clear and descriptive title** for the issue to identify the suggestion.
|
||||
* **Provide a description of the suggested enhancement** in as many details as possible, including the steps that you imagine you (as a user) would take if the feature you're requesting existed.
|
||||
* **Describe the current behaviour** and **explain which behaviour you would like to see instead** and why.
|
||||
* **Include screenshots and animated GIFs** which help demonstrate the steps or point out the parts of Mobilizon which your suggestion is related to. You can use a tool called [LICEcap](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [Silentcast](https://github.com/colinkeenan/silentcast) or [Byzanz](https://github.com/GNOME/byzanz) on Linux.
|
||||
* **Provide specific examples to demonstrate the enhancements**. If possible, include drawings, screenshots, or GIFs of similar features in another app.
|
||||
* **Explain why this enhancement would be useful** to most participants of Mobilizon and isn't something that can or should be implemented as a community extension.
|
||||
* **List some other communities, platforms or apps where this enhancement exists.**
|
||||
|
||||
### Reporting Bugs 🐛
|
||||
|
||||
Open an issue providing the following information by filling in the issue template below, explaining the problem and including additional details to help maintainers reproduce the problem:
|
||||
|
||||
* **Use a clear and descriptive title** for the issue to identify the problem.
|
||||
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining where you started in Mobilizon, and then which actions you took. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse or a keyboard shortcut, and if so which one?
|
||||
* **Provide specific examples to demonstrate the steps**. Include links to pages, screenshots, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
|
||||
* **Describe the behaviour you observed after following the steps** and point out what exactly is the problem with that behaviour.
|
||||
* **Explain which behaviour you expected to see instead and why.**
|
||||
* **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use [LICEcap](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [Silentcast](https://github.com/colinkeenan/silentcast) or [Byzanz](https://github.com/GNOME/byzanz) on Linux.
|
||||
* **If you're reporting a crash**, include a crash report with error logs.
|
||||
* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
|
||||
|
||||
Provide more context by answering these questions:
|
||||
|
||||
* **Did the problem start happening recently** (e.g. after updating to a new version) or was this always a problem?
|
||||
* If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen?
|
||||
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
|
||||
* If the problem is related to an event, comment or actor (eg. user or group), **does the problem happen for all of them or only some?** Does the problem happen only when working with local (originating from your Mobilizon instance) or remote ones, with anything specific about the object? Is there anything else special about the actors or events in question?
|
||||
|
||||
Include details about your configuration and environment:
|
||||
|
||||
* **Which version of each component are you using?**
|
||||
* **What's the name and version of the OS you're using**?
|
||||
* **Are you running in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and the guest?
|
||||
|
||||
---
|
||||
|
||||
### Contributing
|
||||
|
||||
A common misconception about contributing to free and open source projects is that you need to contribute code. In fact, it’s often the other parts of a project that are most overlooked. You’ll do the project a huge favour by offering to pitch in with these types of contributions!
|
||||
|
||||
Even if you like to write code, other types of contributions are a great way to get involved with a project and meet other community members. Building those relationships may open up unexpected opportunities.
|
||||
|
||||
#### Do you like to design? 🎨
|
||||
|
||||
* Restructure layouts to improve the project's usability.
|
||||
* Conduct user research to reorganise and refine the project's navigation or menus.
|
||||
* Create art for icons and app screens.
|
||||
|
||||
#### Do you like to write? ✏
|
||||
|
||||
* Write and improve the project's documentation.
|
||||
* Write tutorials for the project.
|
||||
* Curate a wiki page of examples showing how the project can be used.
|
||||
|
||||
#### Do you like organising? 📥
|
||||
|
||||
* Link to duplicate issues, and suggest new issue labels, to keep things organised.
|
||||
* Go through open issues and suggest revisiting or closing old ones.
|
||||
* Ask clarifying questions on recently opened issues to move the discussion forward.
|
||||
|
||||
#### Do you like helping people? 🙋
|
||||
|
||||
* Answer questions about the project on forums and other sites.
|
||||
* Answer questions for people on open issues.
|
||||
|
||||
#### Do you like helping others code? 👐
|
||||
|
||||
* Review code on other people's submissions.
|
||||
* Write tutorials for how a project can be used.
|
||||
* Offer to mentor another contributor.
|
||||
|
||||
#### Do you like to code? 🔩
|
||||
|
||||
* Find an open issue to tackle.
|
||||
* Offer to help write a new feature.
|
||||
* Improve tooling, testing & deployment options.
|
||||
* Read the **next section for guidelines**.
|
||||
|
||||
---
|
||||
|
||||
### Contributing Code
|
||||
|
||||
Unsure where to begin contributing? You can start by looking through issues tagged with:
|
||||
|
||||
* [`first-timers-only`](https://framagit.org/framasoft/mobilizon/issues?scope=all&utf8=✓&state=opened&label_name[]=🌱 first-timers-only) [https://www.firsttimersonly.com](https://www.firsttimersonly.com)- issues which should only require a few lines of code, and a test or two.
|
||||
* [`help-wanted`](https://framagit.org/framasoft/mobilizon/issues?label_name[]=🙏 help-wanted) - issues which should be a bit more involved than `first-timers-only` issues.
|
||||
|
||||
#### Local development
|
||||
|
||||
Mobilizon can be developed locally. For instructions on how to do this, please see [the documentation](development.md).
|
||||
|
||||
#### Coding & git practices
|
||||
|
||||
* We use GitLab's merge requests as our code review tool.
|
||||
* We encourage any dev to comment on merge requests and we think of the merge request not as a "please approve my code" but as a space for co-developing.
|
||||
* We develop features on separate branches identified by issue numbers.
|
||||
* We don't currently use release branches or tags because we don't have release management at this phase of development.
|
||||
|
||||
#### How to make changes
|
||||
|
||||
* Make your changes on a separate branch which includes an issue number e.g. `1234-some-new-feature` where 1234 is the issue number where the feature is documented. Make sure the branch is based on `master`.
|
||||
* Do not commit changes to files that are irrelevant to your feature or bugfix.
|
||||
* Use commit messages descriptive of your changes.
|
||||
* Push to your own repository fork.
|
||||
* Create a merge request at GitLab.
|
||||
|
||||
#### Git commit messages
|
||||
|
||||
* Limit the first line to 72 characters or less, referencing relevant issue numbers.
|
||||
* Be as descriptive as you want after the first line.
|
||||
* Consider starting the commit message with an applicable emoji (see Issue & Commit Categories below).
|
||||
|
||||
#### Merge requests
|
||||
|
||||
* Follow [the code styleguides](styleguide.md).
|
||||
* Document new code based on [the documentation styleguide](https://hexdocs.pm/elixir/writing-documentation.html).
|
||||
* Each merge request should implement ONE feature or bugfix. If you want to add or fix more than one thing, submit more than one merge request.
|
||||
* Fill in the merge request template below.
|
||||
* Include relevant issue number(s) in the merge request title.
|
||||
* Include screenshots or animated GIFs in your merge request whenever possible.
|
||||
* End all files with a newline.
|
||||
|
||||
#### Template for merge requests
|
||||
|
||||
* Description of the change
|
||||
* Applicable issue numbers
|
||||
* Alternate designs/implementations
|
||||
* Benefits of this implementation
|
||||
* Possible drawbacks
|
||||
* Why should this be part of a core component?
|
||||
* Testing process
|
||||
|
||||
---
|
||||
|
||||
#### Issue & Commit Categories
|
||||
|
||||
* 🚑 `critical` : Critical hotfix!
|
||||
* 💄 `enhancement` : General improvements.
|
||||
* ✨ `feature` : New features.
|
||||
* 🐛 `bug` : Confirmed bugs, or reports that are likely to be bugs.
|
||||
* 🙋 `question` : Questions (e.g. how can I do X?).
|
||||
* 📮 `feedback` : General feedback.
|
||||
* 🎨 `ui` : Visual design.
|
||||
* 📜 `copy` : Text in the apps, or translations.
|
||||
* ℹ `documentation` : Documentation.
|
||||
* 🐎 `performance` : Performance.
|
||||
* 🔒 `security` : Security.
|
||||
* 🔌 `api` : Mobilizon's APIs.
|
||||
* 👽 `external` : External libraries or API integrations.
|
||||
* ⚠ `exception` : Uncaught exceptions.
|
||||
* 🔥 `crash` : Crash.
|
||||
* 🔣 `encoding` : Character encoding or data serialization issue.
|
||||
* 🚚 `cleanup` : Removing, moving or refactoring code or files.
|
||||
* ✅ `tests` : Testing.
|
||||
|
||||
#### Issue Status
|
||||
|
||||
* 💬 `discussion` : Discussion to clarify this issue is ongoing.
|
||||
* 🔜 `todo` : This has been discussed and now needs work.
|
||||
* 🔁 `needs-more-info` : More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).
|
||||
* 💡 `idea` : Needs to be discussed further. Could be a feature request which might be good to first implement as a community extension.
|
||||
* 🚧 `in-progress` : Someone is working on this...
|
||||
* 🙏 `help-wanted` : The Mobilizon core team would appreciate help from the community in resolving these issues.
|
||||
* 🌱 `first-timers-only` : Less complex issues which would be good first issues to work on for users who want to contribute.
|
||||
* 🔢 `needs-reproduction` : Likely bugs, but haven't been reliably reproduced.
|
||||
* 🔴 `blocked` : Blocked on other issues.
|
||||
* 2️⃣ `duplicate` : Duplicate of another issue, i.e. has been reported before.
|
||||
* 🙅 `wontfix` : The Mobilizon core team has decided not to fix these issues (or add these features) for now, because they're working as intended, or some other reason.
|
||||
* 🚮 `invalid` : Issues which are not valid (e.g. spam or submitted by error).
|
||||
|
||||
|
||||
#### Merge Request Status
|
||||
|
||||
* 🚧 `in-progress` : Still being worked on, more changes will follow.
|
||||
* 🚏 `needs-review` : Needs code review and approval from maintainers.
|
||||
* 🔍 `under-review` : Being reviewed by maintainers.
|
||||
* 🔧 `changes-required` : Needs to be updated based on review comments and then reviewed again.
|
||||
* 👀 `needs-testing` : Needs manual testing.
|
||||
|
||||
---
|
||||
|
||||
## Credits
|
||||
The following documents have greatly helped us put this together. A big thank you to their authors and contributors!
|
||||
|
||||
* [MoodleNet's own Contributing document](https://gitlab.com/moodlenet/project/meta/issues/16)
|
||||
* [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
|
||||
* [Open Source Guides](https://opensource.guide)
|
||||
* [Holochain's Development Protocols](https://github.com/holochain/holochain-proto/wiki/Development-Protocols)
|
||||
* [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md)
|
||||
* [Funkwhale's pad on how to Communicate with others](https://hackmd.io/qESHvdHZSWuhLNjeanaVQw?both)
|
|
@ -1,29 +0,0 @@
|
|||
# Styleguide
|
||||
|
||||
## Elixir
|
||||
|
||||
We format our code with the Elixir Formatter and check for issues with [Credo](https://github.com/rrrene/credo) (a few rules are not blocking).
|
||||
|
||||
Please run these two commands before pushing code:
|
||||
|
||||
* `mix format`
|
||||
* `mix credo --strict -a`
|
||||
|
||||
These two commands must not return an error code, since they are required to pass inside CI.
|
||||
|
||||
## Front-end
|
||||
|
||||
### Linting
|
||||
|
||||
We use `tslint` and `eslint` with the `airbnb` preset.
|
||||
Errors should be reported when the development server is running or when building a production bundle `yarn run build`.
|
||||
|
||||
Please run the following command before pushing code `yarn run lint`.
|
||||
|
||||
This command must not return an error code, since it's required to pass inside CI.
|
||||
|
||||
We also try to follow the [official Vue.js style guide](https://vuejs.org/v2/style-guide/).
|
||||
|
||||
### Styleguide
|
||||
|
||||
We present the components used on Mobilizon's front-end here: https://framasoft.frama.io/mobilizon/frontend/. The documentation is builded through [Vue Styleguidist](https://vue-styleguidist.github.io/)
|
|
@ -1,64 +0,0 @@
|
|||
# Tests
|
||||
|
||||
## Backend
|
||||
|
||||
The backend uses `ExUnit`.
|
||||
|
||||
To launch all the tests:
|
||||
```bash
|
||||
mix test
|
||||
```
|
||||
|
||||
!!! info
|
||||
If you're using Docker, you can use `make test`
|
||||
|
||||
If you want test coverage:
|
||||
|
||||
```bash
|
||||
mix coveralls.html
|
||||
```
|
||||
|
||||
It will show the coverage and will output a `cover/excoveralls.html` file.
|
||||
|
||||
If you want to test a single file:
|
||||
|
||||
```bash
|
||||
mix test test/mobilizon/actors/actors_test.exs
|
||||
```
|
||||
|
||||
If you want to test a specific test, block or line:
|
||||
|
||||
```bash
|
||||
mix test test/mobilizon/actors/actors_test.exs:85
|
||||
```
|
||||
|
||||
!!! tip
|
||||
Note: The `coveralls.html` also works the same
|
||||
|
||||
## Front-end
|
||||
|
||||
### Unit tests
|
||||
|
||||
Not done yet.
|
||||
|
||||
### End-to-end tests
|
||||
|
||||
We use [Cypress](https://cypress.io) for End-to-end testing.
|
||||
|
||||
You first need to run the webserver with the `e2e` environment: `MIX_ENV=e2e mix phx.server`. The same environment parameters as the `dev` environment must be provided.
|
||||
This allows to run database operations in the sandbox and not pollute your database.
|
||||
|
||||
Then, run `MIX_ENV=e2e mix run priv/repo/e2e.seed.exs` to have some initial data inside your instance for the tests.
|
||||
|
||||
When inside the `js` directory, you can do either
|
||||
```bash
|
||||
npx cypress run
|
||||
```
|
||||
to run the tests, or
|
||||
```bash
|
||||
npx cypress open
|
||||
```
|
||||
to open the interactive GUI.
|
||||
|
||||
!!! info
|
||||
Cypress provided [a subscription](https://www.cypress.io/oss-plan) to their recording dashboard since Mobilizon is an Open-Source project. Thanks!
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
title: Documentation de Mobilizon
|
||||
---
|
||||
|
||||
Bienvenue sur la documentation de Mobilizon
|
||||
|
||||
* [En apprendre plus à propos de Mobilizon](/about) (en anglais)
|
||||
* Apprendre comment utiliser Mobilizon (pas encore écrit)
|
||||
* [Apprendre à installer Mobilizon](/administration) (en anglais)
|
||||
* [Apprendre à contribuer à Mobilizon](/contribute) (en anglais)
|
|
@ -1,42 +0,0 @@
|
|||
site_name: Mobilizon
|
||||
repo_name: "framasoft/mobilizon"
|
||||
repo_url: "https://framagit.org/framasoft/mobilizon"
|
||||
site_dir: "../../site/fr"
|
||||
extra:
|
||||
social:
|
||||
- icon: "fontawesome/brands/twitter"
|
||||
link: "https://twitter.com/joinmobilizon"
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite
|
||||
- footnotes
|
||||
- meta
|
||||
- toc:
|
||||
permalink: true
|
||||
- pymdownx.superfences
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.smartsymbols
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.tilde
|
||||
- pymdownx.mark
|
||||
plugins:
|
||||
- search:
|
||||
lang: ["fr"]
|
||||
- git-revision-date-localized
|
||||
- minify:
|
||||
minify_html: true
|
||||
theme:
|
||||
name: "material"
|
||||
language: "fr"
|
||||
features:
|
||||
- instant
|
||||
- tabs
|
||||
custom_dir: "../theme/"
|
||||
palette:
|
||||
primary: "amber"
|
||||
accent: "deep purple"
|
||||
scheme: slate
|
||||
font: false
|
||||
icon:
|
||||
logo: material/calendar
|
||||
repo: fontawesome/brands/gitlab
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
title: Mobilizon documentation
|
||||
---
|
||||
|
||||
Welcome to the Mobilizon documentation
|
||||
|
||||
* [Learn more about Mobilizon](about.md)
|
||||
* Learn how to use Mobilizon (not yet written)
|
||||
* [Learn how to install Mobilizon](administration/index.md)
|
||||
* [Learn how to contribute to Mobilizon](contribute/index.md)
|
|
@ -1,18 +0,0 @@
|
|||
const languages = ["fr"];
|
||||
|
||||
const navigatorLanguage =
|
||||
window.navigator.userLanguage || window.navigator.language;
|
||||
|
||||
let language;
|
||||
if (languages.includes(navigatorLanguage)) {
|
||||
language = navigatorLanguage;
|
||||
}
|
||||
const split = navigatorLanguage.split("-")[0];
|
||||
if (languages.includes(split)) {
|
||||
language = split;
|
||||
}
|
||||
const url = new URL(window.location.href);
|
||||
if (language && (url.pathname === "/" || url.pathname.startsWith("/use/"))) {
|
||||
url.pathname = `/${language}${url.pathname}`;
|
||||
window.location.replace(url);
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
../js/public/img/mobilizon_logo.png
|
7
docs/theme/main.html
vendored
7
docs/theme/main.html
vendored
|
@ -1,7 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block site_meta %}
|
||||
{% if page.is_homepage %}
|
||||
<link rel="alternate" hreflang="fr" href="{{ config.site_url }}fr/" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
107
docs/theme/partials/footer.html
vendored
107
docs/theme/partials/footer.html
vendored
|
@ -1,107 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2016-2019 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% import "partials/language.html" as lang with context %}
|
||||
|
||||
<!-- Application footer -->
|
||||
<footer class="md-footer">
|
||||
|
||||
<!-- Link to previous and/or next page -->
|
||||
{% if page.previous_page or page.next_page %}
|
||||
<div class="md-footer-nav">
|
||||
<nav class="md-footer-nav__inner md-grid">
|
||||
|
||||
<!-- Link to previous page -->
|
||||
{% if page.previous_page %}
|
||||
<a href="{{ page.previous_page.url | url }}"
|
||||
title="{{ page.previous_page.title | striptags }}"
|
||||
class="md-flex md-footer-nav__link md-footer-nav__link--prev"
|
||||
rel="prev">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<i class="md-icon md-icon--arrow-back
|
||||
md-footer-nav__button"></i>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--stretch
|
||||
md-footer-nav__title">
|
||||
<span class="md-flex__ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
{{ lang.t("footer.previous") }}
|
||||
</span>
|
||||
{{ page.previous_page.title }}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!-- Link to next page -->
|
||||
{% if page.next_page %}
|
||||
<a href="{{ page.next_page.url | url }}"
|
||||
title="{{ page.next_page.title | striptags }}"
|
||||
class="md-flex md-footer-nav__link md-footer-nav__link--next"
|
||||
rel="next">
|
||||
<div class="md-flex__cell md-flex__cell--stretch
|
||||
md-footer-nav__title">
|
||||
<span class="md-flex__ellipsis">
|
||||
<span class="md-footer-nav__direction">
|
||||
{{ lang.t("footer.next") }}
|
||||
</span>
|
||||
{{ page.next_page.title }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<i class="md-icon md-icon--arrow-forward
|
||||
md-footer-nav__button"></i>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Further information -->
|
||||
<div class="md-footer-meta md-typeset">
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
|
||||
<!-- Copyright and theme information -->
|
||||
<div class="md-footer-copyright">
|
||||
{% if config.copyright %}
|
||||
<div class="md-footer-copyright__highlight">
|
||||
{{ config.copyright }}
|
||||
</div>
|
||||
{% endif %}
|
||||
powered by
|
||||
<a href="https://www.mkdocs.org">MkDocs</a>
|
||||
and
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/">
|
||||
Material for MkDocs</a>
|
||||
{% if page and page.meta.revision_date %}
|
||||
<br>
|
||||
<i>Updated {{ page.meta.revision_date }}</i>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Social links -->
|
||||
{% include "partials/social.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
45
mkdocs.yml
45
mkdocs.yml
|
@ -1,45 +0,0 @@
|
|||
site_name: Mobilizon
|
||||
site_url: "https://docs.joinmobilizon.org/"
|
||||
repo_name: "framasoft/mobilizon"
|
||||
repo_url: "https://framagit.org/framasoft/mobilizon"
|
||||
extra:
|
||||
social:
|
||||
- icon: "fontawesome/brands/twitter"
|
||||
link: "https://twitter.com/joinmobilizon"
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- codehilite
|
||||
- footnotes
|
||||
- meta
|
||||
- toc:
|
||||
permalink: true
|
||||
- pymdownx.superfences
|
||||
- pymdownx.magiclink
|
||||
- pymdownx.smartsymbols
|
||||
- pymdownx.tabbed
|
||||
- pymdownx.tilde
|
||||
- pymdownx.mark
|
||||
plugins:
|
||||
- search
|
||||
- git-revision-date-localized
|
||||
- minify:
|
||||
minify_html: true
|
||||
- exclude:
|
||||
glob:
|
||||
- fr/*
|
||||
theme:
|
||||
name: "material"
|
||||
features:
|
||||
- instant
|
||||
- tabs
|
||||
custom_dir: "docs/theme/"
|
||||
palette:
|
||||
primary: "amber"
|
||||
accent: "deep purple"
|
||||
scheme: slate
|
||||
font: false
|
||||
icon:
|
||||
logo: material/calendar
|
||||
repo: fontawesome/brands/gitlab
|
||||
extra_javascript:
|
||||
- javascripts/redirect.js
|
Loading…
Reference in a new issue