Soapbox FE --> Soapbox

This commit is contained in:
Alex Gleason
2022-08-29 11:20:56 -05:00
parent c29bf4040a
commit 5fec9c580b
51 changed files with 83 additions and 94 deletions

View File

@ -1,10 +1,10 @@
# Installing Soapbox FE on a subdomain
# Installing Soapbox on a subdomain
If you would like to retain Pleroma FE on your Pleroma server, but install Soapbox FE alongside it on a subdomain, you can do so by following these steps.
If you would like to retain Pleroma FE on your Pleroma server, but install Soapbox alongside it on a subdomain, you can do so by following these steps.
## 1. Download the build
Create a directory on your system for Soapbox FE.
Create a directory on your system for Soapbox.
```sh
mkdir -p /opt/soapbox
@ -144,7 +144,7 @@ If that passed, reload Nginx:
systemctl reload nginx
```
If all is well, you should be able to visit the subdomain in your browser and access Soapbox FE!
If all is well, you should be able to visit the subdomain in your browser and access Soapbox!
---

View File

@ -1,10 +1,10 @@
# Installing Soapbox FE via YunoHost
# Installing Soapbox via YunoHost
If you want to install Soapbox FE to a Pleroma instance installed using [YunoHost](https://yunohost.org), you can do so by following these steps.
If you want to install Soapbox to a Pleroma instance installed using [YunoHost](https://yunohost.org), you can do so by following these steps.
## 1. Download the build
First, download the latest build of Soapbox FE from GitLab.
First, download the latest build of Soapbox from GitLab.
```sh
curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.3.0/download?job=build-production -o soapbox-fe.zip
@ -18,7 +18,7 @@ Then, unzip the build to the Pleroma directory under YunoHost's directory:
busybox unzip soapbox-fe.zip -o -d /home/yunohost.app/pleroma/
```
**That's it! 🎉 Soapbox FE is installed.** The change will take effect immediately, just refresh your browser tab. It's not necessary to restart the Pleroma service.
**That's it! 🎉 Soapbox is installed.** The change will take effect immediately, just refresh your browser tab. It's not necessary to restart the Pleroma service.
---

View File

@ -1,6 +1,6 @@
# Removing Soapbox
Removing Soapbox FE and reverting to Pleroma FE is really easy. Just run the following:
Removing Soapbox and reverting to Pleroma FE is really easy. Just run the following:
```
rm /opt/pleroma/instance/static/index.html
rm -R /opt/pleroma/instance/static/packs

View File

@ -2,17 +2,17 @@
You should always check the [release notes/changelog](https://gitlab.com/soapbox-pub/soapbox-fe/-/blob/develop/CHANGELOG.md) in case there are deprecations, special update changes, etc.
Besides that, it's relatively pretty easy to update Soapbox FE. There's two ways to go about it: with the command line or with an unofficial script.
Besides that, it's relatively pretty easy to update Soapbox. There's two ways to go about it: with the command line or with an unofficial script.
## Updating with the command line
To update Soapbox FE via the command line, do the following:
To update Soapbox via the command line, do the following:
```
# Download the build.
curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v(latest.version.here)/download?job=build-production -o soapbox-fe.zip
curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip
# Remove all the current Soapbox FE build in Pleroma's instance directory.
# Remove all the current Soapbox build in Pleroma's instance directory.
rm -R /opt/pleroma/instance/static/packs
rm /opt/pleroma/instance/static/index.html
rm -R /opt/pleroma/instance/static/sounds
@ -21,16 +21,6 @@ rm -R /opt/pleroma/instance/static/sounds
busybox unzip soapbox-fe.zip -o -d /opt/pleroma/instance
```
## Updating with an unofficial script
You can also update Soapbox using [Sandia Mesa's updater bash script for Soapbox FE](https://code.sandiamesa.com/traboone/soapbox-update).
First, download the updater script if you haven't yet: ``sudo -Hu pleroma wget -P /var/lib/pleroma https://code.sandiamesa.com/traboone/soapbox-update/raw/branch/master/soapbox-update.sh -N``
Then, set the permissions of the updater script so that it can be executed: ``chmod u+x /var/lib/pleroma/soapbox-update.sh``
Finally, go to the Pleroma user's directory ``cd /var/lib/pleroma`` and then run ``sudo -Hu pleroma ./soapbox-update.sh``.
## After updating Soapbox
The changes take effect immediately, just refresh your browser tab. It's not necessary to restart the Pleroma service.

View File

@ -87,7 +87,7 @@ The full app entity must be provided, for example:
"client_id": "cf5yI6ffXH1UcDkEApEIrtHpwCi5Tv9xmju8IKdMAkE",
"client_secret": "vHmSDpm6BJGUvR4_qWzmqWjfHcSYlZumxpFfohRwNNQ",
"id": "7132",
"name": "Soapbox FE",
"name": "Soapbox",
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob",
"website": "https://soapbox.pub/",
"vapid_key": "BLElLQVJVmY_e4F5JoYxI5jXiVOYNsJ9p-amkykc9NcI-jwa9T1Y2GIbDqbY-HqC6ayPkfW4K4o9vgBFKYmkuS4"
@ -98,7 +98,7 @@ It is crucial that the app has the expected scopes.
You can obtain one with the following curl command (replace `MY_DOMAIN`):
```sh
curl -X POST -H "Content-Type: application/json" -d '{"client_name": "Soapbox FE", "redirect_uris": "urn:ietf:wg:oauth:2.0:oob", "scopes": "read write follow push admin", "website": "https://soapbox.pub/"}' "https://MY_DOMAIN.com/api/v1/apps"
curl -X POST -H "Content-Type: application/json" -d '{"client_name": "Soapbox", "redirect_uris": "urn:ietf:wg:oauth:2.0:oob", "scopes": "read write follow push admin", "website": "https://soapbox.pub/"}' "https://MY_DOMAIN.com/api/v1/apps"
```
### Custom files (`custom/instance/*`)
@ -114,7 +114,7 @@ Some use cases:
## Environment variables
When compiling Soapbox FE, environment variables may be passed to change the build itself.
When compiling Soapbox, environment variables may be passed to change the build itself.
For example:
```sh
@ -123,7 +123,7 @@ NODE_ENV="production" FE_BUILD_DIR="public" FE_SUBDIRECTORY="/soapbox" yarn buil
### `NODE_ENV`
The environment to build Soapbox FE for.
The environment to build Soapbox for.
Options:
@ -138,7 +138,7 @@ It's recommended to always build in `"production"` mode for live sites.
### `BACKEND_URL`
The base URL for API calls.
You only need to set this if Soapbox FE is hosted in a different place than the backend.
You only need to set this if Soapbox is hosted in a different place than the backend.
Options:
@ -159,7 +159,7 @@ Default: `"static"`
### `FE_SUBDIRECTORY`
Subdirectory to host Soapbox FE out of.
Subdirectory to host Soapbox out of.
When hosting on a subdirectory, you must create a custom build for it.
This option will set the imports in `index.html`, and the basename for routes in React.

View File

@ -1,6 +1,6 @@
# How it works
Soapbox FE is a [single-page application (SPA)](https://en.wikipedia.org/wiki/Single-page_application) that runs entirely in the browser with JavaScript.
Soapbox is a [single-page application (SPA)](https://en.wikipedia.org/wiki/Single-page_application) that runs entirely in the browser with JavaScript.
It has a single HTML file, `index.html`, responsible only for loading the required JavaScript and CSS.
It interacts with the backend through [XMLHttpRequest (XHR)](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest).

View File

@ -8,9 +8,9 @@ All configuration is optional, except `NODE_ENV`.
## `NODE_ENV`
The Node environment.
Soapbox FE checks for the following options:
Soapbox checks for the following options:
- `development` - What you should use while developing Soapbox FE.
- `development` - What you should use while developing Soapbox.
- `production` - Use when compiling to deploy to a live server.
- `test` - Use when running automated tests.

View File

@ -8,12 +8,12 @@ First, follow the instructions to [install Pleroma](https://docs-develop.pleroma
## Install Soapbox
The Soapbox frontend is the main component of Soapbox. Once you've installed Pleroma, installing Soapbox FE is a breeze.
The Soapbox frontend is the main component of Soapbox. Once you've installed Pleroma, installing Soapbox is a breeze.
First, ssh into the server and download a .zip of the latest build: ``curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.3.0/download?job=build-production -o soapbox-fe.zip``
First, ssh into the server and download a .zip of the latest build: ``curl -L https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/develop/download?job=build-production -o soapbox-fe.zip``
Then unpack it into Pleroma's ``instance`` directory: ``busybox unzip soapbox-fe.zip -o -d /opt/pleroma/instance``
**That's it! 🎉 Soapbox FE is installed.** The change will take effect immediately, just refresh your browser tab. It's not necessary to restart the Pleroma service.
**That's it! 🎉 Soapbox is installed.** The change will take effect immediately, just refresh your browser tab. It's not necessary to restart the Pleroma service.
***For OTP releases,*** *unpack to /var/lib/pleroma instead.*