• Stars
    star
    328
  • Rank 128,352 (Top 3 %)
  • Language
    Elixir
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docker image for the Pleroma federated social network

Pleroma

Pleroma 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.

Pleroma

Pleromians trying to understand the memes

Features

  • Based on the elixir:alpine image
  • Ran as an unprivileged user
  • It works great

Sadly, this is not a reusable (e.g. I can't upload it to the Docker Hub), because for now Pleroma needs to compile the configuration. 😒 Thus you will need to build the image yourself, but I explain how to do it below.

Build-time variables

  • PLEROMA_VER : Pleroma version (latest commit of the develop branch by default)
  • GID: group id (default: 911)
  • UID: user id (default: 911)

Usage

Installation

Create a folder for your Pleroma instance. Inside, you should have Dockerfile and docker-compose.yml from this repo.

Here is the docker-compose.yml. You should change the POSTGRES_PASSWORD variable.

version: "3.8"

services:
  db:
    image: postgres:12.1-alpine
    container_name: pleroma_db
    restart: always
    environment:
      POSTGRES_USER: pleroma
      POSTGRES_PASSWORD: ChangeMe!
      POSTGRES_DB: pleroma
    volumes:
      - ./postgres:/var/lib/postgresql/data

  web:
    image: pleroma
    container_name: pleroma_web
    restart: always
    ports:
      - "4000:4000"
    build:
      context: .
      # Feel free to remove or override this section
      # See 'Build-time variables' in README.md
      args:
        - "UID=911"
        - "GID=911"
        - "PLEROMA_VER=develop"
    volumes:
      - ./uploads:/var/lib/pleroma/uploads
      - ./static:/var/lib/pleroma/static
      - ./config.exs:/etc/pleroma/config.exs:ro
      # optional, see 'Config Override' section in README.md
      # - ./config-override.exs:/var/lib/pleroma/config.exs:ro
    environment:
      DOMAIN: example.com
      INSTANCE_NAME: Pleroma
      ADMIN_EMAIL: [email protected]
      NOTIFY_EMAIL: [email protected]
      DB_USER: pleroma
      DB_PASS: ChangeMe!
      DB_NAME: pleroma
    depends_on:
      - db

Create the upload and config folder and give write permissions for the uploads:

mkdir uploads config
chown -R 911:911 uploads

Pleroma needs the citext PostgreSQL extension, here is how to add it:

docker-compose up -d db
docker exec -i pleroma_db psql -U pleroma -c "CREATE EXTENSION IF NOT EXISTS citext;"
docker-compose down

Optionally configure Pleroma, see Config Override. You can now build the image. 2 way of doing it:

docker-compose build
# or
docker build -t pleroma .

I prefer the latter because it's more verbose but this will ignore any build-time variables you have set in docker-compose.yml.

You can now launch your instance:

docker-compose up -d

The initial creation of the database schema will be done automatically. Check if everything went well with:

docker logs -f pleroma_web

Make a new admin user using docker exec (replace fakeadmin with any username you'd like):

docker exec -it pleroma_web sh ./bin/pleroma_ctl user new fakeadmin [email protected] --admin

You can now setup a Nginx reverse proxy in a container or on your host by using the example Nginx config.

Update

By default, the Dockerfile will be built from the latest commit of the develop branch as Pleroma does not have releases for now.

Thus to update, just rebuild your image and recreate your containers:

docker-compose pull # update the PostgreSQL if needed
docker-compose build .
# or
docker build -t pleroma .
docker-compose run --rm web mix ecto.migrate # migrate the database if needed
docker-compose up -d # recreate the containers if needed

If you want to run a specific commit, you can use the PLEROMA_VER variable:

docker build -t pleroma . --build-arg PLEROMA_VER=develop # a branch
docker build -t pleroma . --build-arg PLEROMA_VER=a9203ab3 # a commit
docker build -t pleroma . --build-arg PLEROMA_VER=v2.0.7 # a version

a9203ab3 being the hash of the commit. (They're here)

This value can also be set through docker-compose.yml as seen in the example file provided in this repository.

Config Override

By default the provided docker-compose.yml file mounts config.exs in the Pleroma container, this file is a dynamic configuration that sources some values from the environment variables provided to the container (variables like ADMIN_EMAIL etc.).

For those that want to change configuration that is not exposed through environment variables there is the option to mount the config-override.exs file which can than be modified to your satisfaction. Values set in this file will override anything set in config.exs. The override file provided in this repository disables new registrations on your instance, as an example.

Other Docker images

Here are other Pleroma Docker images that helped me build mine:

More Repositories

1

openvpn-install

Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
Shell
10,394
star
2

wireguard-install

WireGuard VPN installer for Linux servers
Shell
5,660
star
3

nginx-autoinstall

Compile NGINX from source with custom modules and patches on Debian and Ubuntu
Shell
605
star
4

feedbin-docker

Self-host your own Feedbin RSS reader in Docker
Dockerfile
213
star
5

awesome-stars

A curated list of my GitHub stars!
150
star
6

arch-linux-install

My Arch Linux installation notes
86
star
7

local-dns-resolver

Script to install a local Unbound DNS resolver on your Linux machine with DNSSEC support
Shell
77
star
8

ansible-roles

My Ansible roles for Debian/Ubuntu
67
star
9

awesome-lxc-lxd

A curated list of awesome LXC and LXD tools, libraries and related projects.
43
star
10

Casper-XYZ

Custom Ghost theme for my blog, based on Casper
CSS
37
star
11

ansible-restic

Ansible role for restic
Jinja
31
star
12

palette

Extract color palette from an image with k-means and k-NN // Project for the AI/ML class at Hanyang University
Python
30
star
13

firstfm-ios

The alternative last.fm client for iOS made with SwiftUI
Swift
26
star
14

gitlab-repo-dl

Mass repositories downloader for GitLab
Shell
25
star
15

ansible-wireguard

Ansible role for Wireguard - setup a mesh private network for your servers
Jinja
22
star
16

php-xdebug-docker

Debug PHP with Xdebug inside Docker. Tested with PhpStorm and VS Code.
Dockerfile
21
star
17

back-to-the-future

πŸš€ No more empty squares on your GitHub profile.
Shell
19
star
18

nixos-config

My NixOS configuration files
Nix
16
star
19

node-chat-app

A simple node chat app to train with socket.io
JavaScript
16
star
20

larafeed

Feed reader for the web, built with Laravel and Vue
PHP
14
star
21

docker-diaspora

A Docker image for the Diaspora* federated social network
Dockerfile
14
star
22

dockerfiles

Dockerfiles πŸ‹
Dockerfile
13
star
23

ansible-base

Ansible "base" role
Jinja
13
star
24

trakt-cli

A CLI for trakt.tv
Go
13
star
25

hiveway-fix

A chrome extension to fix Hiveway
JavaScript
13
star
26

GNU-Linux

Put RMS in your browser.
JavaScript
12
star
27

server-status

A little Bash script that checks if a server is up or down with ICMP, and sends a mail with status update.
Shell
12
star
28

ansible-php-fpm

Ansible role for PHP-FPM
11
star
29

youtube-dl-mp3

Simply convert a Youtube video into a .mp3 audio file using youtube-dl
Shell
11
star
30

sqlite3-c-examples

SQLite 3 examples in C
C
11
star
31

ansible-caddy

Ansible role for Caddy
Jinja
8
star
32

angristan

✨special ✨ repository
Python
8
star
33

firstfm-android

Android client for Last.fm written in Kotlin. School project.
Kotlin
7
star
34

OpenNIC-cli

Set the nearest OpenNIC servers as your DNS resolvers on you GNU/Linux machine
Shell
6
star
35

LinuxKernelBuild

Sccript to compile and install the Linux Kernel from source
Shell
6
star
36

docker-isso

Alpine-based docker image for the Isso Python commenting system
Dockerfile
6
star
37

AngristanRPiBot

Quelques scripts pour faire un bot Twitter en Python/Bash sur un Raspberry Pi.
Python
5
star
38

Cours-de-japonais

Fiches de japonais pour dΓ©butant (WIP)
5
star
39

docker-searx

Alpine-based Docker image for the Searx metasearch engine
Dockerfile
4
star
40

ansible-prometheus

Ansible role for Prometheus
Jinja
4
star
41

meetndo

Meetup website made with Ruby on Rails // Project for the Software Engineering class at Hanyang University
Ruby
4
star
42

s3-destroyer

Empty an S3 bucket as fast as possible πŸ’¨
Go
3
star
43

spark-project-esgi

Python
3
star
44

OpenVPN-install-old

OpenVPN installation script for Debian 8 - discontinued
Shell
3
star
45

electron-cat-poly-pdf

Electron app to draw polygons on a cat and export it to PDF
JavaScript
3
star
46

spotify-search-proxy

API that proxies Spotify's search API with cache
Go
3
star
47

ansible-docker

Ansible role for Debian and Docker
3
star
48

ansible-kibana

Ansible role for Kibana
Jinja
3
star
49

bsport-exporter

An exporter for bsport.io to track workouts sessions πŸ’ͺ
Go
3
star
50

ansible-node-exporter

Ansible role for Node exporter
Jinja
3
star
51

ai-assign-2

Assignment for the Introduction to Artificial Intelligence class at Hanyang University
Python
3
star
52

bsport-charts

Generate graphs to visualize Bsport sessions over time πŸ’ͺ
Go
3
star
53

docker-hastebin

Alpine-based Docker image for Hastebin, the node.js paste service
JavaScript
3
star
54

isso-to-disqus

This tool generates an Disqus-compatible WXR-like XML file from an Isso SQLite database file.
Python
3
star
55

docker-ghost

Alpine-based Docker image for the Ghost publishing platform
Dockerfile
3
star
56

openfoodfacts-api-c

Simple program to get product information from the Open Food Facts API, in C.
C
2
star
57

ansible-yarn

Ansible role to install Yarn
2
star
58

twitter-pic-bot

A very simple Ruby bot that tweets random pictures from a directory
Ruby
2
star
59

ansible-alertmanager

Ansible role for Prometheus Alertmanager
2
star
60

ansible-blackbox-exporter

Ansible role for Prometheus Blackbox exporter
2
star
61

sample-socket-io-server

Basic websocket server with node.js and socket.io
JavaScript
2
star
62

go-wallet-bdd-test

School assignment: Simple wallet using Behavior-driven development
Go
2
star
63

ansible-varnish

Simple Ansible role for Varnish on Debian/Ubuntu
2
star
64

advent-of-code-2021

Advent of Code 2021 with Go
Go
2
star
65

ansible-elasticsearch

Ansible role for Elasticsearch
Jinja
2
star
66

gist-stats-cron

1
star
67

node-weather-app

A basic CLI aysnc node weather app to train with promises
JavaScript
1
star
68

ansible-netdata

Simple Ansible role for Netdata
1
star
69

ansible-grafana

Ansible role for Grafana
1
star
70

julia-playground

Damn, Julia
Julia
1
star
71

java-ram-simulation

Java
1
star
72

ansible-postgres-exporter

Ansible role for postgres_exporter
Jinja
1
star
73

docker-riot

Alpine-based Docker images for Riot, the web Matrix client
Dockerfile
1
star
74

solid-library-kata

Go
1
star
75

ansible-powershell

Installs Powershell on Debian from the Microsoft APT repository
1
star
76

vuejs-hello-world

Discovering Vue
JavaScript
1
star
77

advent-of-code-2023

Go
1
star
78

ansible-redis

Ansible role for Redis
1
star
79

ansible-redis-exporter

Ansible role for redis-exporter
Jinja
1
star
80

ansible-zfs-auto-snapshot

zfs-auto-snapshot Ansible role
Shell
1
star
81

bitcoin-telegram-bot

Telegram bot that sends the BTC price every minute. (Assignment)
Python
1
star
82

bool2-crystal

Crystal
1
star
83

node-web-server

A simple node web server to train with express and handlebars
JavaScript
1
star