Merge branch 'master' into patch-2
|
@ -7,11 +7,11 @@ There are two parts to Mastodon, the server and the web client. The translations
|
|||
|
||||
| Original file (English) | Location | Description |
|
||||
|---|---|---|
|
||||
| [`en.jsx`](/app/assets/javascripts/components/locales/en.jsx) | `app/assets/javascripts/components/locales/en.jsx` | Strings for the web client |
|
||||
| [`en.yml`](/config/locales/en.yml) | `config/locales/en.yml` | Strings for general use |
|
||||
| [`simple_form.en.yml`](/config/locales/simple_form.en.yml) | `config/locales/simple_form.en.yml` | Strings for the settings area |
|
||||
| [`devise.en.yml`](/config/locales/devise.en.yml) | `config/locales/devise.en.yml` | Generic strings for Devise |
|
||||
| [`doorkeeper.en.yml`](/config/locales/doorkeeper.en.yml) | `config/locales/doorkeeper.en.yml` | Generic strings for Doorkeeper |
|
||||
| [`en.jsx`](https://github.com/tootsuite/mastodon/blob/master/app/assets/javascripts/components/locales/en.jsx) | `app/assets/javascripts/components/locales/en.jsx` | Strings for the web client |
|
||||
| [`en.yml`](https://github.com/tootsuite/mastodon/blob/master/config/locales/en.yml) | `config/locales/en.yml` | Strings for general use |
|
||||
| [`simple_form.en.yml`](https://github.com/tootsuite/mastodon/blob/master/config/locales/simple_form.en.yml) | `config/locales/simple_form.en.yml` | Strings for the settings area |
|
||||
| [`devise.en.yml`](https://github.com/tootsuite/mastodon/blob/master/config/locales/devise.en.yml) | `config/locales/devise.en.yml` | Generic strings for Devise |
|
||||
| [`doorkeeper.en.yml`](https://github.com/tootsuite/mastodon/blob/master/config/locales/doorkeeper.en.yml) | `config/locales/doorkeeper.en.yml` | Generic strings for Doorkeeper |
|
||||
|
||||
## Translating
|
||||
|
||||
|
@ -30,10 +30,10 @@ The locales are mentioned in several other files. To activate your translation,
|
|||
|
||||
| File | Location | Comment |
|
||||
|---|---|---|
|
||||
| [`index.jsx`](/app/assets/javascripts/components/locales/index.jsx) | `app/assets/javascripts/components/locales/index.jsx` | 2 lines to add |
|
||||
|[`mastodon.jsx`](/app/assets/javascripts/components/containers/mastodon.jsx) | `app/assets/javascripts/components/containers/mastodon.jsx` | 1 line to add + 1 list to complete |
|
||||
| [`settings_helper.rb`](/app/helpers/settings_helper.rb) | `app/helpers/settings_helper.rb` | 1 line to add + your language’s name |
|
||||
| [`application.rb`](/config/application.rb) | `config/application.rb` | 1 list to complete |
|
||||
| [`index.jsx`](https://github.com/tootsuite/mastodon/blob/master/app/assets/javascripts/components/locales/index.jsx) | `app/assets/javascripts/components/locales/index.jsx` | 2 lines to add |
|
||||
|[`mastodon.jsx`](https://github.com/tootsuite/mastodon/blob/master/app/assets/javascripts/components/containers/mastodon.jsx) | `app/assets/javascripts/components/containers/mastodon.jsx` | 1 line to add + 1 list to complete |
|
||||
| [`settings_helper.rb`](https://github.com/tootsuite/mastodon/blob/master/app/helpers/settings_helper.rb) | `app/helpers/settings_helper.rb` | 1 line to add + your language’s name |
|
||||
| [`application.rb`](https://github.com/tootsuite/mastodon/blob/master/config/application.rb) | `config/application.rb` | 1 list to complete |
|
||||
|
||||
## Sending the translation
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ You can check code quality with:
|
|||
|
||||
## Development tips
|
||||
|
||||
You can use a localhost->world tunneling service like ngrok if you want to test federation, **however** that should not be your primary mode of operation. If you want to have a permanently federating server, set up a proper instance on a VPS with a domain name, and simply keep it up to date with your own fork of the project while doing development on localhost.
|
||||
You can use a localhost->world tunneling service like [ngrok](https://ngrok.com) if you want to test federation, **however** that should not be your primary mode of operation. If you want to have a permanently federating server, set up a proper instance on a VPS with a domain name, and simply keep it up to date with your own fork of the project while doing development on localhost.
|
||||
|
||||
Ngrok and similar services give you a random domain on each start up. This is good enough to test how the code you're working on handles real-world situations. But as soon as your domain changes, for everybody else concerned you're a different instance than before.
|
||||
|
||||
|
@ -47,4 +47,4 @@ Generally, federation bits are tricky to work on for exactly this reason - it's
|
|||
|
||||
I advise to study the existing code and the RFCs before trying to implement any federation-related changes. It's not *that* difficult, but I think "here be dragons" applies because it's easy to break.
|
||||
|
||||
If your development environment is running remotely (e.g. on a VPS or virtual machine), setting the `REMOTE_DEV` environment variable will swap your instance from using "letter opener" (which launches a local browser) to "letter opener web" (which collects emails and displays them at /letter_opener ).
|
||||
If your development environment is running remotely (e.g. on a VPS or virtual machine), setting the `REMOTE_DEV` environment variable will swap your instance from using "letter opener" (which launches a local browser) to "letter opener web" (which collects emails and displays them at /letter_opener ).
|
||||
|
|
|
@ -3,8 +3,18 @@ Heroku guide
|
|||
|
||||
[](https://dashboard.heroku.com/new?button-url=https://github.com/tootsuite/mastodon&template=https://github.com/tootsuite/mastodon)
|
||||
|
||||
Mastodon can be run on a free [Heroku](https://heroku.com) app. It should be
|
||||
noted this has limited testing and could have unpredictable results.
|
||||
Mastodon _can_ be run on a free [Heroku](https://heroku.com) app. It should be
|
||||
noted this has limited testing and could have unpredictable results in
|
||||
production. For production uses, free hobby dynos are probably not sufficient.
|
||||
See [#1275](https://github.com/tootsuite/mastodon/issues/1275) for details.
|
||||
|
||||
## Limitations
|
||||
|
||||
Currently heroku setup has two main limitations:
|
||||
|
||||
- Animated GIF upload requires extra setup ([#1007](https://github.com/tootsuite/mastodon/issues/1007)).
|
||||
- Streaming API requires extra setup ([#1119](https://github.com/tootsuite/mastodon/issues/1119)).
|
||||
|
||||
|
||||
## Basic setup
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ server {
|
|||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
|
||||
location / {
|
||||
try_files $uri @proxy;
|
||||
}
|
||||
|
@ -61,7 +63,7 @@ server {
|
|||
proxy_set_header Proxy "";
|
||||
proxy_pass_header Server;
|
||||
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_buffering off;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
|
@ -92,6 +94,49 @@ server {
|
|||
}
|
||||
```
|
||||
|
||||
## Apache
|
||||
|
||||
Setting up Mastodon behind Apache is possible as well, although you will need to enable [mod_proxy_wstunnel](https://httpd.apache.org/docs/trunk/mod/mod_proxy_wstunnel.html) beforehand. The configuration is then pretty straightforward.
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin contact@example.com
|
||||
ServerName example.com
|
||||
Redirect Permanent / https://example.com/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerAdmin contact@example.com
|
||||
ServerName example.com
|
||||
|
||||
DocumentRoot /home/mastodon/live/public/
|
||||
|
||||
Header add Strict-Transport-Security "max-age=31536000"
|
||||
SSLEngine on
|
||||
SSLProtocol -all +TLSv1.2
|
||||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite EECDH+AESGCM:AES256+EECDH:AES128+EECDH
|
||||
|
||||
SSLCertificateFile example.pem
|
||||
SSLCertificateKeyFile example.key
|
||||
|
||||
ProxyPreserveHost On
|
||||
RequestHeader set X-Forwarded-Proto "https"
|
||||
ProxyPass /500.html !
|
||||
ProxyPass /oops.png !
|
||||
ProxyPass /api/v1/streaming/ ws://localhost:4000/
|
||||
ProxyPassReverse /api/v1/streaming/ ws://localhost:4000/
|
||||
ProxyPass / http://localhost:3000/
|
||||
ProxyPassReverse / http://localhost:3000/
|
||||
|
||||
ErrorDocument 500 /500.html
|
||||
ErrorDocument 501 /500.html
|
||||
ErrorDocument 502 /500.html
|
||||
ErrorDocument 503 /500.html
|
||||
ErrorDocument 504 /500.html
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
## Running in production without Docker
|
||||
|
||||
It is recommended to create a special user for mastodon on the server (you could call the user `mastodon`), though remember to disable outside login for it. You should only be able to get into that user through `sudo su - mastodon`.
|
||||
|
@ -123,6 +168,17 @@ In the prompt:
|
|||
CREATE USER mastodon CREATEDB;
|
||||
\q
|
||||
|
||||
Under Ubuntu 16.04, you will need to explicitly enable ident authentication so that local users can connect to the database without a password:
|
||||
|
||||
sudo sed -i '/^local.*postgres.*peer$/a host all all 127.0.0.1/32 ident' /etc/postgresql/9.?/main/pg_hba.conf
|
||||
|
||||
and install an ident daemon, which does not come installed by default:
|
||||
|
||||
sudo apt-get install pidentd
|
||||
sudo systemctl enable pidentd
|
||||
sudo systemctl start pidentd
|
||||
sudo systemctl restart postgresql
|
||||
|
||||
## Rbenv
|
||||
|
||||
It is recommended to use rbenv (exclusively from the `mastodon` user) to install the desired Ruby version. Follow the guides to [install rbenv][1] and [rbenv-build][2] (I recommend checking the [prerequisites][3] for your system on the rbenv-build project and installing them beforehand, obviously outside the unprivileged `mastodon` user)
|
||||
|
@ -239,15 +295,15 @@ This allows you to `sudo systemctl enable /etc/systemd/system/mastodon-*.service
|
|||
|
||||
## Cronjobs
|
||||
|
||||
I recommend creating a couple cronjobs for the following tasks:
|
||||
There are several tasks that should be run once a day to ensure that mastodon is
|
||||
running smoothly. As your mastodon user run `crontab -e` and enter the following
|
||||
|
||||
- `RAILS_ENV=production bundle exec rake mastodon:media:clear`
|
||||
- `RAILS_ENV=production bundle exec rake mastodon:push:refresh`
|
||||
- `RAILS_ENV=production bundle exec rake mastodon:feeds:clear`
|
||||
|
||||
You may want to run `which bundle` first and copypaste that full path instead of simply `bundle` in the above commands because cronjobs usually don't have all the paths set. The time and intervals of when to run these jobs are up to you, but once every day should be enough for all.
|
||||
|
||||
You can edit the cronjob file for the `mastodon` user by running `sudo crontab -e -u mastodon` (outside of the mastodon user).
|
||||
```
|
||||
RAILS_ENV=production
|
||||
@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:media:clear > /dev/null
|
||||
@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:push:refresh > /dev/null
|
||||
@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:feeds:clear > /dev/null
|
||||
```
|
||||
|
||||
## Things to look out for when upgrading Mastodon
|
||||
|
||||
|
|
|
@ -3,17 +3,32 @@ List of apps
|
|||
|
||||
Some people have started working on apps for the Mastodon API. Here is a list of them:
|
||||
|
||||
## Clients
|
||||
|
||||
|App|Platform|Link|Developer(s)|
|
||||
|---|--------|----|------------|
|
||||
|[Tusky](https://play.google.com/store/apps/details?id=com.keylesspalace.tusky)|Android|<https://github.com/Vavassor/Tusky>|[@Vavassor@mastodon.social](https://mastodon.social/users/Vavassor)|
|
||||
|mastodroid|Android|<https://github.com/alin-rautoiu/mastodroid>|[@charlag@mastodon.social](https://mastodon.social/users/charlag)|
|
||||
|TootyFruity|iOS/Android|<https://github.com/eggplantPrince/tootyFruity>|[@eggplant@mastodon.social](https://mastodon.social/users/eggplant)|
|
||||
|11t|iOS/Android|<https://github.com/jeroensmeets/mastodon-app>|[@jeroensmeets@mastodon.social](https://mastodon.social/users/jeroensmeets)|
|
||||
|TootyFruity|iOS/[Android](https://play.google.com/store/apps/details?id=ch.kevinegli.tootyfruity221258)|<https://github.com/eggplantPrince/tootyFruity>|[@eggplant@mastodon.social](https://mastodon.social/users/eggplant)|
|
||||
|11t|iOS/[Android](https://play.google.com/store/apps/details?id=com.jeroensmeets.mastodon)|<https://github.com/jeroensmeets/mastodon-app>|[@jeroensmeets@mastodon.social](https://mastodon.social/users/jeroensmeets)|
|
||||
|[Amaroq](https://itunes.apple.com/us/app/amarok-for-mastodon/id1214116200?ls=1&mt=8)|iOS|<https://itunes.apple.com/us/app/amarok-for-mastodon/id1214116200?ls=1&mt=8>|[@eurasierboy@mastodon.social](https://mastodon.social/users/eurasierboy)|
|
||||
|Albatross|iOS||[@goldie_ice@mastodon.social](https://mastodon.social/users/goldie_ice)|
|
||||
|Tooter|Chrome|<https://github.com/ineffyble/tooter>|[@effy@mastodon.social](https://mastodon.social/users/effy)|
|
||||
|tootstream|CLI|<https://github.com/magicalraccoon/tootstream>|[@Raccoon@mastodon.social](https://mastodon.social/users/Raccoon)|
|
||||
|HackerNewsBot|CLI|<https://github.com/raymestalez/mastodon-hnbot>|[@rayalez@hackertribe.io](https://hackertribe.io/users/rayalez)|
|
||||
|[Mastodon UWP (beta)](https://github.com/woachk/mastodon/releases)|Windows 10|<https://github.com/woachk/mastodon>|[@my123@mastodon.social](https://mastodon.social/users/my123)|
|
||||
|
||||
## Bridges from/to other platforms
|
||||
|
||||
|App|Platform|Link|Developer(s)|
|
||||
|---|--------|----|------------|
|
||||
|Retoot|CLI|<https://gitlab.com/mojo42/retoot>|[@Mojo@apoil.org](https://apoil.org/users/mojo)|
|
||||
|Mastodon.tools|Wordpress, web browser, social network|<https://github.com/davidlibeau/mastodon-tools>|[@David@mastodon.xyz](https://mastodon.xyz/users/David)|
|
||||
|
||||
If you have a project like this, let me know so I can add it to the list!
|
||||
## Bots
|
||||
|
||||
|App|Platform|Link|Developer(s)|
|
||||
|---|--------|----|------------|
|
||||
|HackerNewsBot|CLI|<https://github.com/raymestalez/mastodon-hnbot>|[@rayalez@hackertribe.io](https://hackertribe.io/users/rayalez)|
|
||||
|
||||
|
||||
If you have a project like this, make a PR to add it to the list!
|
||||
|
|
|
@ -26,7 +26,7 @@ There is also a list at [instances.mastodon.xyz](https://instances.mastodon.xyz)
|
|||
| [mastodon.partipirate.org](https://mastodon.partipirate.org) |French Pirate Party Instance - Politics and stuff|Yes|No|
|
||||
| [social.targaryen.house](https://social.targaryen.house) |Federates everywhere, quick updates.|Yes|Yes|
|
||||
| [masto.themimitoof.fr](https://masto.themimitoof.fr) |N/A|Yes|Yes|
|
||||
| [mstdn.io](https://mstdn.io) |N/A|Yes|Yes|
|
||||
| [mstdn.io](https://mstdn.io) |Fast and up-to-date instance, welcoming everyone around the world|Yes|Yes|
|
||||
| [social.imirhil.fr](https://social.imirhil.fr) |N/A|No|Yes|
|
||||
| [social.wxcafe.net](https://social.wxcafe.net) |Open registrations, queer people, activists, safe as much as possible |Yes|Yes|
|
||||
| [octodon.social](https://octodon.social) |Open registrations, federates everywhere, cutest instance yet|Yes|Yes|
|
||||
|
@ -74,7 +74,7 @@ There is also a list at [instances.mastodon.xyz](https://instances.mastodon.xyz)
|
|||
| [manx.social](https://manx.social/)|Instance for the Isle of Man|Yes|Yes|
|
||||
| [mastodon.host](https://mastodon.host/)|Lightly moderated, federates everywhere and has a follow bot ( Huge federated timeline )|Yes|No|
|
||||
| [mastodon.fun](https://mastodon.fun/)|Mastodon for everyone ! |Yes|Yes|
|
||||
| [oulipo.social](https://oulipo.social/)|An Oulipo Mastodon in which that fifth symbol in Latin script is taboo|Yes|No|
|
||||
| [oulipo.social](https://oulipo.social/)|An Oulipo Mastodon in which that fifth symbol in Latin script is taboo|Yes|Yes|
|
||||
| [indigo.zone](https://indigo.zone)|Open Registrations, General Purpose|Yes|No|
|
||||
| [mastodon.cloud](https://mastodon.cloud)|An open Mastodon instance with people from all around the world|Yes|Yes|
|
||||
| [mst3k.interlinked.me](https://mst3k.interlinked.me)|Open registrations, general purpose|Yes|Yes|
|
||||
|
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 396 KiB After Width: | Height: | Size: 390 KiB |
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 32 KiB |
|
@ -44,6 +44,7 @@ ___
|
|||
- [For JavaScript](https://github.com/Zatnosk/libodonjs)
|
||||
- [For JavaScript (Node.js)](https://github.com/jessicahayley/node-mastodon)
|
||||
- [For Elixir](https://github.com/milmazz/hunter)
|
||||
- [For R](https://github.com/ThomasChln/mastodon)
|
||||
|
||||
___
|
||||
|
||||
|
|