Mobilizon: Unterschied zwischen den Versionen
Peh (Diskussion | Beiträge) |
KKeine Bearbeitungszusammenfassung |
||
(3 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt) | |||
Zeile 17: | Zeile 17: | ||
== Download und Entpacken der Software == | == Download und Entpacken der Software == | ||
<syntaxhighlight lang=shell> | |||
mkdir ~/tmp | |||
cd ~/tmp | |||
wget https://joinmobilizon.org/latest-package -O mobilizon.tgz | |||
cd ~ | |||
tar xzf ~/tmp/mobilizon.tgz | |||
</syntaxhighlight> | |||
== Konfiguration == | == Konfiguration == | ||
Zeile 27: | Zeile 29: | ||
Die Datei ''config.exs'': | Die Datei ''config.exs'': | ||
<syntaxhighlight lang=sh> | |||
cd ~/mobilizon | |||
./bin/mobilizon_ctl instance gen --output ~/mobilizon/config.exs | |||
!!! /home/pacs/peh19/users/mobilizon/mobilizon/config.exs not found! Please ensure it exists and that | |||
MOBILIZON_CONFIG_PATH is unset or points to an existing file | |||
What domain will your instance use? (e.g mobilizon.org) [] groups.hs-example.de | |||
What is the name of your instance? (e.g. Mobilizon) [] Mobilizon | |||
What's the address email will be send with? [noreply@groups.hs-example.de] | |||
What is the hostname of your database? [localhost] | |||
What is the name of your database? [mobilizon_prod] xyz00_mobilizon | |||
What is the user used to connect to your database? [mobilizon] xyz00_mobilizon | |||
What is the password used to connect to your database? [autogenerated] | |||
What port will the app listen to (leave it if you are using the default setup with nginx)? [4000] 37080 | |||
Writing config to /home/pacs/xyz00/users/mobilizon/mobilizon/config.exs. | |||
Writing setup_db.psql. | |||
</syntaxhighlight> | |||
<syntaxhighlight lang=elixir> | |||
# cat ~/mobilizon/config.exs | |||
# | |||
# Mobilizon instance configuration | |||
import Config | |||
config :mobilizon, Mobilizon.Web.Endpoint, | |||
server: true, | |||
url: [host: "groups.hs-example.de"], | |||
http: [ | |||
ip: {127,0,0,1}, | |||
port: 37080 | |||
], | |||
secret_key_base: "XXXXXXXX" | |||
config :mobilizon, Mobilizon.Web.Auth.Guardian, | |||
secret_key: "YYYYYYYY" | |||
config :mobilizon, :instance, | |||
name: "Mobilizon", | |||
description: "Change this to a proper description of your instance", | |||
hostname: "groups.hs-example.de", | |||
registrations_open: false, | |||
demo: false, | |||
allow_relay: true, | |||
federating: true, | |||
email_from: "noreply@groups.hs-example.de", | |||
email_reply_to: "noreply@groups.hs-example.de" | |||
config :mobilizon, Mobilizon.Storage.Repo, | |||
adapter: Ecto.Adapters.Postgres, | |||
username: "xyz00_mobilizon", | |||
password: "******", | |||
database: "xyz00_mobilizon", | |||
hostname: "localhost", | |||
port: "5432", | |||
pool_size: 10 | |||
# manuell hinzugefuegt! | |||
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, | |||
uploads: "/home/storage/xyz00/users/mobilizon/uploads" | |||
</syntaxhighlight> | |||
== Datenbank-Initialisierung == | == Datenbank-Initialisierung == | ||
<syntaxhighlight lang=shell> | |||
export MOBILIZON_CONFIG_PATH=$HOME/mobilizon/config.exs | |||
cd ~/mobilizon | |||
./bin/mobilizon_ctl migrate | |||
./bin/mobilizon_ctl users.new "webmaster@groups.hs-example.de" --admin --password "******" | |||
</syntaxhighlight> | |||
== Systemd-Service == | == Systemd-Service == | ||
<syntaxhighlight lang=ini> | |||
# cat ~/.config/systemd/user/mobilizon.service | |||
# | |||
[Unit] | |||
Description=Mobilizon Service | |||
After=network.target postgresql.service | |||
[Service] | |||
Type=simple | |||
WorkingDirectory=%h/mobilizon | |||
ExecStart=%h/mobilizon/bin/mobilizon start | |||
Restart=always | |||
Environment=MIX_ENV=prod | |||
Environment=PATH=/usr/local/bin:/usr/bin:/bin | |||
Environment=HOME=%h | |||
Environment=MOBILIZON_CONFIG_PATH=%h/mobilizon/config.exs | |||
Environment=ERL_EPMD_ADDRESS=127.0.0.1 | |||
Environment=ERL_EPMD_PORT=37369 | |||
Environment=LANG=de_DE.UTF-8 | |||
PrivateTmp=true | |||
NoNewPrivileges=true | |||
[Install] | |||
WantedBy=default.target | |||
</syntaxhighlight> | |||
== Links == | == Links == |
Aktuelle Version vom 24. Mai 2024, 11:12 Uhr
Mobilizon ist eine Plattform, die am sog. "Fediverse" teilnimmt. Das Fediverse bezeichnet ein Netzwerk föderierter, voneinander unabhängiger sozialer Netzwerke. Dazu gehören insbesondere die Micro-Blogging Plattformen Mastodon, Pleroma und Misskey.
Mobilizon stellt im Fediverse Funktionen für die Bekanntmachung von Veranstaltungen bereit. Veranstalungen werden hier organisiert, Terlnehmende werden mobilisiert. Mobilizon bietet gute Alternativen zu Facebook-Gruppen und -Fanpages.
Installation
Der Betrieb von Mobilizon erfordert in der Regel einen Webspace auf einem eigenen Managed Server, weil mehrere Server-Dienste betrieben werden und weil Erweiterungen in der PostgreSQL-Datenbank installiert werden müssen.
Vorbereitung
Zur Vorbereitung wird im Hostsharing-Webspace mit HSAdmin ein Service-User (im Beispiel xyz00-mobilizon) angelegt. Der Service-User wird Domain-Admin für die Domain, unter der die Mobilizon-Instanz später erreichbar sein soll. Im folgenden nutzen wir die Domain groups.hs-example.de als Beispiel.
Die Software verwendet PostgreSQL als Datenbanksystem mit der PostGIS-Erweiterung. Als weiteren Vobereitungsschritt legen wir mit HSAdmin einen User in PostgreSQL an und verwenden den PostgreSQL-User als Eigentümer für die Mobilizon-Datenbank. Im Folgenden heißen PostgreSQL-User und PostgreSQL-Datenbank beides xyz00_mobilizon.
Damit die PostGIS-Funktionalität in der neuen Datenbank zur Verfügung steht, muss der Hostsharing-Service die Erweiterungen postgis, pg_trgm und unaccent in der neu angelegten Datenbank einspielen. Wir bitten den Service in einer E-Mail an service@hostsharing.net unter Angabe Namens der Datenbank um die Aktivierung der Erweiterungen.
Download und Entpacken der Software
mkdir ~/tmp
cd ~/tmp
wget https://joinmobilizon.org/latest-package -O mobilizon.tgz
cd ~
tar xzf ~/tmp/mobilizon.tgz
Konfiguration
Die Datei config.exs:
cd ~/mobilizon
./bin/mobilizon_ctl instance gen --output ~/mobilizon/config.exs
!!! /home/pacs/peh19/users/mobilizon/mobilizon/config.exs not found! Please ensure it exists and that
MOBILIZON_CONFIG_PATH is unset or points to an existing file
What domain will your instance use? (e.g mobilizon.org) [] groups.hs-example.de
What is the name of your instance? (e.g. Mobilizon) [] Mobilizon
What's the address email will be send with? [noreply@groups.hs-example.de]
What is the hostname of your database? [localhost]
What is the name of your database? [mobilizon_prod] xyz00_mobilizon
What is the user used to connect to your database? [mobilizon] xyz00_mobilizon
What is the password used to connect to your database? [autogenerated]
What port will the app listen to (leave it if you are using the default setup with nginx)? [4000] 37080
Writing config to /home/pacs/xyz00/users/mobilizon/mobilizon/config.exs.
Writing setup_db.psql.
# cat ~/mobilizon/config.exs
#
# Mobilizon instance configuration
import Config
config :mobilizon, Mobilizon.Web.Endpoint,
server: true,
url: [host: "groups.hs-example.de"],
http: [
ip: {127,0,0,1},
port: 37080
],
secret_key_base: "XXXXXXXX"
config :mobilizon, Mobilizon.Web.Auth.Guardian,
secret_key: "YYYYYYYY"
config :mobilizon, :instance,
name: "Mobilizon",
description: "Change this to a proper description of your instance",
hostname: "groups.hs-example.de",
registrations_open: false,
demo: false,
allow_relay: true,
federating: true,
email_from: "noreply@groups.hs-example.de",
email_reply_to: "noreply@groups.hs-example.de"
config :mobilizon, Mobilizon.Storage.Repo,
adapter: Ecto.Adapters.Postgres,
username: "xyz00_mobilizon",
password: "******",
database: "xyz00_mobilizon",
hostname: "localhost",
port: "5432",
pool_size: 10
# manuell hinzugefuegt!
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local,
uploads: "/home/storage/xyz00/users/mobilizon/uploads"
Datenbank-Initialisierung
export MOBILIZON_CONFIG_PATH=$HOME/mobilizon/config.exs
cd ~/mobilizon
./bin/mobilizon_ctl migrate
./bin/mobilizon_ctl users.new "webmaster@groups.hs-example.de" --admin --password "******"
Systemd-Service
# cat ~/.config/systemd/user/mobilizon.service
#
[Unit]
Description=Mobilizon Service
After=network.target postgresql.service
[Service]
Type=simple
WorkingDirectory=%h/mobilizon
ExecStart=%h/mobilizon/bin/mobilizon start
Restart=always
Environment=MIX_ENV=prod
Environment=PATH=/usr/local/bin:/usr/bin:/bin
Environment=HOME=%h
Environment=MOBILIZON_CONFIG_PATH=%h/mobilizon/config.exs
Environment=ERL_EPMD_ADDRESS=127.0.0.1
Environment=ERL_EPMD_PORT=37369
Environment=LANG=de_DE.UTF-8
PrivateTmp=true
NoNewPrivileges=true
[Install]
WantedBy=default.target