Merge pull request 'clean-up docs to avoid version-mismatches in BE and FE in new installs (for stable)' (#378) from stefan230/akkoma:stable into stable
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/378
This commit is contained in:
commit
d9508474b6
8 changed files with 65 additions and 32 deletions
|
@ -21,24 +21,23 @@ Currently, known `<frontend>` values are:
|
||||||
- [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
|
- [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
|
||||||
- [mastodon-fe](https://akkoma.dev/AkkomaGang/masto-fe)
|
- [mastodon-fe](https://akkoma.dev/AkkomaGang/masto-fe)
|
||||||
- [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
|
- [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
|
||||||
- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
|
|
||||||
|
|
||||||
You can still install frontends that are not configured, see below.
|
You can still install frontends that are not configured, see below.
|
||||||
|
|
||||||
## Example installations for a known frontend
|
## Example installations for a known frontend (Stable-Version)
|
||||||
|
|
||||||
For a frontend configured under the `available` key, it's enough to install it by name.
|
For a frontend configured under the `available` key, it's enough to install it by name.
|
||||||
|
|
||||||
=== "OTP"
|
=== "OTP"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./bin/pleroma_ctl frontend install pleroma-fe
|
./bin/pleroma_ctl frontend install pleroma-fe --ref stable
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "From Source"
|
=== "From Source"
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mix pleroma.frontend install pleroma-fe
|
mix pleroma.frontend install pleroma-fe --ref stable
|
||||||
```
|
```
|
||||||
|
|
||||||
This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin`).
|
This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin`).
|
||||||
|
|
|
@ -1,17 +1,36 @@
|
||||||
# Updating your instance
|
# Updating your instance
|
||||||
|
|
||||||
You should **always check the [release notes/changelog](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/CHANGELOG.md)** in case there are config deprecations, special update steps, etc.
|
You should **always check the [release notes/changelog](https://akkoma.dev/AkkomaGang/akkoma/src/branch/stable/CHANGELOG.md)** in case there are config deprecations, special update steps, etc.
|
||||||
|
|
||||||
Besides that, doing the following is generally enough:
|
Besides that, doing the following is generally enough:
|
||||||
|
## Switch to the akkoma user
|
||||||
|
```sh
|
||||||
|
# Using sudo
|
||||||
|
sudo -su akkoma
|
||||||
|
|
||||||
|
# Using doas
|
||||||
|
doas -su akkoma
|
||||||
|
|
||||||
|
# Using su
|
||||||
|
su -s "$SHELL" akkoma
|
||||||
|
```
|
||||||
|
|
||||||
## For OTP installations
|
## For OTP installations
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Download the new release
|
# Download latest stable release
|
||||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl update"
|
./bin/pleroma_ctl update --branch stable
|
||||||
|
|
||||||
# Migrate the database, you are advised to stop the instance before doing that
|
# Stop akkoma
|
||||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate"
|
./bin/pleroma stop # or using the system service manager (e.g. systemctl stop akkoma)
|
||||||
|
|
||||||
|
# Run database migrations
|
||||||
|
./bin/pleroma_ctl migrate
|
||||||
|
|
||||||
|
# Update Pleroma-FE frontend to latest stable. For other Frontends see Frontend Configration doc for more information.
|
||||||
|
./bin/pleroma_ctl frontend install pleroma-fe --ref stable
|
||||||
|
|
||||||
|
# Start akkoma
|
||||||
|
./bin/pleroma daemon # or using the system service manager (e.g. systemctl start akkoma)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you selected an alternate flavour on installation,
|
If you selected an alternate flavour on installation,
|
||||||
|
@ -19,13 +38,28 @@ you _may_ need to specify `--flavour`, in the same way as
|
||||||
[when installing](../../installation/otp_en#detecting-flavour).
|
[when installing](../../installation/otp_en#detecting-flavour).
|
||||||
|
|
||||||
## For from source installations (using git)
|
## For from source installations (using git)
|
||||||
|
Run as the `akkoma` user:
|
||||||
|
|
||||||
1. Go to the working directory of Akkoma (default is `/opt/akkoma`)
|
```sh
|
||||||
2. Run `git pull` [^1]. This pulls the latest changes from upstream.
|
# Pull in new changes
|
||||||
3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
|
git pull
|
||||||
4. Stop the Akkoma service.
|
|
||||||
5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
|
|
||||||
6. Start the Akkoma service.
|
|
||||||
|
|
||||||
[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `git` and `mix` tasks as `akkoma` user by adding `sudo -Hu akkoma` before the command.
|
# Run with production configuration
|
||||||
[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.
|
export MIX_ENV=prod
|
||||||
|
|
||||||
|
# Download and compile dependencies
|
||||||
|
mix deps.get
|
||||||
|
mix compile
|
||||||
|
|
||||||
|
# Stop akkoma (replace with your system service manager's equivalent if different)
|
||||||
|
sudo systemctl stop akkoma
|
||||||
|
|
||||||
|
# Run database migrations
|
||||||
|
mix ecto.migrate
|
||||||
|
|
||||||
|
# Update Pleroma-FE frontend to latest stable. For other Frontends see Frontend Configration doc for more information.
|
||||||
|
mix pleroma.frontend install pleroma-fe --ref stable
|
||||||
|
|
||||||
|
# Start akkoma (replace with your system service manager's equivalent if different)
|
||||||
|
sudo systemctl start akkoma
|
||||||
|
```
|
||||||
|
|
|
@ -84,12 +84,12 @@ doas adduser -S -s /bin/false -h /opt/akkoma -H -G akkoma akkoma
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `doas -u akkoma command`. You can also switch to a shell by using `doas -su akkoma`. If you don’t have and want `doas` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
**Note**: To execute a single command as the Akkoma system user, use `doas -u akkoma command`. You can also switch to a shell by using `doas -su akkoma`. If you don’t have and want `doas` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
* Git clone the AkkomaBE repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
doas mkdir -p /opt/akkoma
|
doas mkdir -p /opt/akkoma
|
||||||
doas chown -R akkoma:akkoma /opt/akkoma
|
doas chown -R akkoma:akkoma /opt/akkoma
|
||||||
doas -u akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
doas -u akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git -b stable /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
@ -109,7 +109,7 @@ doas -u akkoma mix deps.get
|
||||||
* This may take some time, because parts of akkoma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
doas -u akkoma mv config/{generated_config.exs,prod.secret.exs}
|
doas -u akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
|
|
|
@ -75,12 +75,12 @@ sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
* Git clone the AkkomaBE repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /opt/akkoma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R akkoma:akkoma /opt/akkoma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git -b stable /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
@ -100,7 +100,7 @@ sudo -Hu akkoma mix deps.get
|
||||||
* This may take some time, because parts of akkoma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
|
|
|
@ -49,12 +49,12 @@ sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
* Git clone the AkkomaBE repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /opt/akkoma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R akkoma:akkoma /opt/akkoma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git -b stable /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
@ -74,7 +74,7 @@ sudo -Hu akkoma mix deps.get
|
||||||
* This may take some time, because parts of akkoma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
|
|
|
@ -74,12 +74,12 @@ sudo useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||||
|
|
||||||
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
**Note**: To execute a single command as the Akkoma system user, use `sudo -Hu akkoma command`. You can also switch to a shell by using `sudo -Hu akkoma $SHELL`. If you don’t have and want `sudo` on your system, you can use `su` as root user (UID 0) for a single command by using `su -l akkoma -s $SHELL -c 'command'` and `su -l akkoma -s $SHELL` for starting a shell.
|
||||||
|
|
||||||
* Git clone the AkkomaBE repository and make the Akkoma user the owner of the directory:
|
* Git clone the AkkomaBE repository from stable-branch and make the Akkoma user the owner of the directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo mkdir -p /opt/akkoma
|
sudo mkdir -p /opt/akkoma
|
||||||
sudo chown -R akkoma:akkoma /opt/akkoma
|
sudo chown -R akkoma:akkoma /opt/akkoma
|
||||||
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git /opt/akkoma
|
sudo -Hu akkoma git clone https://akkoma.dev/AkkomaGang/akkoma.git -b stable /opt/akkoma
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
@ -99,7 +99,7 @@ sudo -Hu akkoma mix deps.get
|
||||||
* This may take some time, because parts of akkoma get compiled first.
|
* This may take some time, because parts of akkoma get compiled first.
|
||||||
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
* After that it will ask you a few questions about your instance and generates a configuration file in `config/generated_config.exs`.
|
||||||
|
|
||||||
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instance, `dev.secret.exs` for development instances):
|
* Check the configuration and if all looks right, rename it, so Akkoma will load it (`prod.secret.exs` for productive instances):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
sudo -Hu akkoma mv config/{generated_config.exs,prod.secret.exs}
|
||||||
|
|
|
@ -37,7 +37,7 @@ sudo dnf install git gcc g++ erlang elixir erlang-os_mon erlang-eldap erlang-xme
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd ~
|
cd ~
|
||||||
git clone https://akkoma.dev/AkkomaGang/akkoma.git
|
git clone https://akkoma.dev/AkkomaGang/akkoma.git -b stable
|
||||||
```
|
```
|
||||||
|
|
||||||
* Change to the new directory:
|
* Change to the new directory:
|
||||||
|
|
|
@ -12,7 +12,7 @@ Release URLs will always be of the form
|
||||||
https://akkoma-updates.s3-website.fr-par.scw.cloud/{branch}/akkoma-{flavour}.zip
|
https://akkoma-updates.s3-website.fr-par.scw.cloud/{branch}/akkoma-{flavour}.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
Where branch is usually `stable` or `develop`, and `flavour` is
|
Where branch is usually `stable` and `flavour` is
|
||||||
the one [that you detect on install](../otp_en/#detecting-flavour).
|
the one [that you detect on install](../otp_en/#detecting-flavour).
|
||||||
|
|
||||||
So, for an AMD64 stable install, your update URL will be
|
So, for an AMD64 stable install, your update URL will be
|
||||||
|
|
Loading…
Reference in a new issue