83 lines
3.7 KiB
Markdown
83 lines
3.7 KiB
Markdown
# Pleroma
|
|
|
|
[Pleroma](https://pleroma.social/) is a federated social networking platform, compatible with GNU social and other OStatus implementations. It is free software licensed under the AGPLv3.
|
|
|
|
It actually consists of two components: a backend, named simply Pleroma, and a user-facing frontend, named Pleroma-FE.
|
|
|
|
Its main advantages are its lightness and speed.
|
|
|
|
## Why Docker?
|
|
|
|
Boxing up Pleroma in a docker container allows it to be portable, and keeps your host system clean. The software and its dependencies will all be under the `pleroma_web` container (created with the lightweight elixir:alpine base image) while its postgres database will live under `pleroma_db` image. Only port 4000 will be exposed under localhost.
|
|
|
|
## Build-time variables
|
|
|
|
- **`PLEROMA_VER`** : Pleroma version (latest commit of the [`develop` branch](https://git.pleroma.social/pleroma/pleroma) by default)
|
|
- **`GID`**: group id (default: `911`)
|
|
- **`UID`**: user id (default: `911`)
|
|
|
|
## Usage
|
|
|
|
### Installation
|
|
|
|
This container is meant to run behind a reverse proxy. Please set up letsencrypt and a Nginx reverse proxy in a container or on your host by using the [example Nginx config](https://git.pleroma.social/pleroma/pleroma/blob/develop/installation/pleroma.nginx). There's also a config file in the `extras` folder you could take a look at.
|
|
|
|
Log into your server and clone this repository with:
|
|
|
|
`git clone https://kitsunemimi.club/git/bronze/docker-pleroma`
|
|
|
|
Go into the new docker-pleroma folder and run:
|
|
|
|
`sh ./scripts/setup.sh`
|
|
|
|
This first time setup script will ask you a few questions, generate a random password for your postgres database, put the results into your docker compose and create an admin account.
|
|
|
|
Remember that password reset link at the end will only work if your reverse proxy is configured and running (duh!).
|
|
|
|
Any further configuration can be done as soon as you log into your admin account, over admin-fe. It will be the speedometer icon right next to the cog on the top right of the webpage.
|
|
|
|
### Maintenance
|
|
|
|
A very helpful [bash alias](https://www.digitalocean.com/community/tutorials/an-introduction-to-useful-bash-aliases-and-functions) for managing your pleroma instance:
|
|
|
|
`alias pleroma-ctl='docker exec -it pleroma_web sh ./bin/pleroma_ctl'`
|
|
|
|
Now you can easily run any of the CLI commands cited in the [documentation](https://docs-develop.pleroma.social/backend/administration/CLI_tasks/user/).
|
|
|
|
#### Common tasks
|
|
|
|
Update to the latest pleroma-fe frontend using:
|
|
|
|
`sh ./scripts/update-plfe.sh`
|
|
|
|
Update/rebuild the pleroma backend using:
|
|
|
|
`sh ./scripts/rebuild.sh`
|
|
|
|
Vacuum your database with this script:
|
|
|
|
`sh ./scripts/vacuum.sh`
|
|
|
|
Emojis are under `./static/emoji` so drag and drop your folders there.
|
|
|
|
#### Backups
|
|
|
|
Backups can be done by copying the whole docker-pleroma folder. How you make this copy I'll leave up to you.
|
|
|
|
For my own instance, I take a btrfs snapshot of this folder and make a tarball / squashfs archive of that snapshot. Should SHTF I have the snapshots and tarballs to fall back on!
|
|
|
|
However you choose to do it, make sure to `docker compose down` before making the backup, you dont want anything modified as you're making the copy.
|
|
|
|
#### Upgrading database version
|
|
|
|
Please see `UPDATE-DB.md`
|
|
|
|
## Other Docker images
|
|
|
|
- [angristan/docker-pleroma](https://github.com/angristan/docker-pleroma) (the one this is based off of!)
|
|
- [verita84/pleroma](https://git.poster.place/verita84/pleroma)
|
|
- [verita84/akkoma](https://git.poster.place/verita84/akkoma)
|
|
- [potproject/docker-pleroma](https://github.com/potproject/docker-pleroma)
|
|
- [rysiek/docker-pleroma](https://git.pleroma.social/rysiek/docker-pleroma)
|
|
- [RX14/iscute.moe](https://github.com/RX14/kurisu.rx14.co.uk/blob/master/services/iscute.moe/pleroma/Dockerfile)
|