# Pleroma

A light weight, general ActivityPub server. Think Twitter/Mastodon without the additional hardware needs.

## Inspiration / Further Reading

- [https://pleroma.social/](https://pleroma.social/)
- [https://git.pleroma.social/pleroma/pleroma](https://git.pleroma.social/pleroma/pleroma)

## Prep Install

``` bash

# Prep
mkdir -p /var/pleroma/config /var/pleroma/uploads
cd /var/pleroma
touch config/generated_config.exs
touch config/setup_db.psql

# Ensure we pull the right pleroma image for the board
ARCH=`arch`
if [ $ARCH == "aarch64" ]
then
    ARCH="arm64v8"
else
    ARCH="arm32v7"
fi

# Generate config / setup_db.psql
docker run --rm -it \
    -v ${PWD}/config/generated_config.exs:/app/pleroma/config/generated_config.exs \
    -v ${PWD}/config/setup_db.psql:/app/pleroma/config/setup_db.psql \
    --entrypoint /bin/bash \
    registry.lollipopcloud.solutions/$ARCH/pleroma:latest \
    -l -c "cd /app/pleroma && source ~/.bash_profile && mix pleroma.instance gen --force"

# Generate VAPID key needed by mastodon UI
docker run --rm -it \
    -v ${PWD}/config/generated_config.exs:/app/pleroma/config/generated_config.exs \
    -v ${PWD}/config/setup_db.psql:/app/pleroma/config/setup_db.psql \
    --entrypoint /bin/bash \
    registry.lollipopcloud.solutions/$ARCH/pleroma:latest \
    -l -c "cd /app/pleroma && source ~/.bash_profile && mix web_push.gen.keypair"

# Tweak config and setup database
nano -w config/generated_config.exs
mv config/generated_config.exs config/prod.secret.exs
sudo su postgres -c 'psql -f config/setup_db.psql'

```

## Install / Run

``` bash

wget -O pleroma.sh https://git.lollipopcloud.solutions/lollipop-docker/pleroma/raw/branch/master/run.sh
chmod a+x pleroma.sh

```

Simply execute ```/root/pleroma.sh``` to update/run Pleroma.
