4 dual boot with qvitter
imo edited this page 2017-11-02 14:48:43 +00:00

General Information

While Pleroma FE is still in development, it can be run in parallel with a GNU Social classic + Qvitter installation.

Pleroma FE is a completely static js client that works using the same Statusnet API that mobile clients like Twidere use. It can be deployed anywhere, it doesn't need to run on the same server as the GS instance at all.

However, because of browser limitations, Pleroma FE needs either the correct CORS headers set on the GS server, or the GS servers /api endpoints re-routed to appear under the same domain (see the example).

Another option is to just drop the index.html into the GS root directory and rename it to pleroma.html, for example. It can then be accessed by visiting my.gs.server/pleroma.html. This requires the hash-routed build of Pleroma.

The build process at pipelines will leave behind the compiled client as build artifacts, which can be deployed as-is.

Method 1 - Renaming index.html

This method is the easiest to setup, but it will result in not-so-pretty urls.

Step by Step

  1. Download the latest feature/hash-routed branch build zip at pipelines.
  2. Unzip and rename dist/index.html to dist/pleroma.html
  3. Copy the contents of the dist folder into the root GS folder.
  4. That's it, Pleroma should now be accessible under my.gs.server/pleroma.html

Method 2 - Nginx forwarding

Step by Step (nginx, forwarding)

  1. Download the latest development branch build zip at pipelines.
  2. Copy the contents of the dist folder into the folder where you want to host Pleroma FE (/var/www/pleroma in the example).
  3. Add the nginx config as in the example below. Adjust domains names of Pleroma domain (pleroma.heldscal.la) and GS domain (social.heldscal.la)
  4. Restart the nginx server.
  5. That's it!

If you experience any problems, you can reach me at #wiredfe:matrix.heldscal.la.

Nginx example config

server {
  listen 80;
  server_name pleroma.heldscal.la;
  # enforce https
  location / {
      return 301 https://$server_name$request_uri;
  }

}

server {
  listen 443 ssl;
  server_name pleroma.heldscal.la;

  ssl_certificate ssl.cert;
  ssl_certificate_key ssl.pem;

  root /varw/www/pleroma;

  location /api {
	  proxy_set_header X-Forwarded-Host $host;
	  proxy_set_header X-Forwarded-Server $host;
	  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	  proxy_pass https://social.heldscal.la/api;
  }

  location / {
	  try_files $uri $uri/ /index.html;
  }
}