Code Monkey home page Code Monkey logo

docker-pleroma's Introduction

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:

docker-pleroma's People

Contributors

angristan avatar captainbeyondds8 avatar dependabot[bot] avatar excodex avatar felix-two-tone avatar fusion avatar namelivia avatar newmedicine avatar peterrus avatar skyleite avatar th0mcat avatar waylon531 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-pleroma's Issues

About configuration

Hi guys and thank you for the great work!

I'm trying to set up pleroma with this docker repo and it seems to work but I have a problem, when I go to password reset it says

Selection_048

So I'm the admin, how do I enable password reset?

I also have problem, when I go to registration by invite the client(UI) doesn't say anything but in console I see 403 always, I feel like all of this a re somehow connected, do you know is something is off in my config?

My secret.esx example

use Mix.Config

config :pleroma, Pleroma.Web.Endpoint,
   http: [ ip: {0, 0, 0, 0}, ],
   url: [host: "***************", scheme: "https", port: 443],
   secret_key_base: "***************"

config :pleroma, :instance,
  name: "***************",
  email: "***************",
  limit: 5000,
  registrations_open: false,
  invites_enabled: true,
  federating: true

# Configure your database
config :pleroma, Pleroma.Repo,
  adapter: Ecto.Adapters.Postgres,
  username: "pleroma",
  password: "pleroma",
  database: "pleroma",
  hostname: "***************",
  pool_size: 10

config :pleroma, :rate_limit,
  password_reset: 60

config :web_push_encryption, :vapid_details,
  subject: "mailto:***************",
  public_key: "***************",
  private_key: "***************"

Copy of the config for migration

I am having trouble finding a copy of my config that will work in a migration to a new setup not using this docker setup. Just trying to have a documented way out in case I need to install locally instead of using docker.

As shown here part of the backup and migration is moving the prod.secrets.exs file, which in this docker project is dynamically configured.

Any help will be appreciated β™₯

Fails at step 14 "copy ./config.exs"

I try to set up this docker, however I encounter an error at the very last steps (14/16) :

"Step 14/16 : COPY ./config.exs /etc/pleroma/config.exs
COPY failed: file not found in build context or excluded by .dockerignore: stat config.exs: file does not exist"

Any idea what could provoke this?

ERROR: unable to select packages libcrypto.so.3 required by: libsrt-1.5.1-r0

I got the following error message during the build process on an ARM64 machine:

ERROR: unable to select packages:
  so:libcrypto.so.3 (no such package):
    required by: libsrt-1.5.1-r0[so:libcrypto.so.3]

I fixed it by adding
echo "http://nl.alpinelinux.org/alpine/latest-stable/main"
into the command
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories && apk update && apk add git gcc g++ musl-dev make cmake file-dev exiftool imagemagick libmagic ncurses postgresql-client ffmpeg

cannot follow mastodon account

Hi,

Great work, thanks ! Make it much easier to install pleroma I think, when there as compilation issues with the standard tuto.

But it looks like I cannot follow a mastodon account: direct messages are fine in both directions, but follows requests does not work. Any idea why ?

dockerfile not using elixir:1.9

During setup following the steps in the readme, I encountered:
** (Mix) You're trying to run :pleroma on Elixir v1.8.2 but it has declared in its mix.exs file it supports only Elixir ~> 1.9

Changed dockerfile from elixir:1.8 to elixir:1.9, and it worked.

Service 'web' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder081051733/config/secret.exs: no such file or directory

I'm getting this error when trying to build Pleroma. I have /config/secret.exs, so I don't know what it's complaining about.

This is my current file structure:

.
β”œβ”€β”€ build
β”‚Β Β  └── Dockerfile
β”œβ”€β”€ config
β”‚Β Β  └── secret.exs
β”œβ”€β”€ db (just a bunch of postgres stuff in here)
β”œβ”€β”€ docker-compose.yml
└── uploads

This is my docker-compose.yml:

version: '2.3'

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

  web:
    build: ./build
    image: pleroma
    container_name: pleroma-web
    restart: always
    ports:
      - '127.0.0.1:4000:4000'
    volumes:
      - ./uploads:/pleroma/uploads
    depends_on:
      - db

Unable to pull the latest stable channel update

Hello,

I've tried to update my instance today with the stable channel. 2.2.1 looks be merged to it now, yet when I pull the source using docker-compose pull, then docker build -t pleroma . it just gives me 2.2.0.

I noted that it does mention that web needs to be built with docker-compose build web but I though the docker build -t pleroma . would cover that.

After the build I get Successfully built 4356aa2a5f15

The `mix ecto.migrate` command hangs

Hi. I'm trying to follow the instruction from readme, but I face an issue on the step:

docker-compose run --rm web mix ecto.migrate

it runs, it creates tables in the postgres db, but it hangs and doesn't stop. See the logs attached.
What can I do about that?

pleroma_web_run.log

Web failed to build, missing cmake?

Hi, I attempted to build using the default version and it failed, giving this error.

==> fast_html
# Sadly, build components separately seems to sporadically fail
cd c_src/lexbor; cmake -DLEXBOR_BUILD_SEPARATELY=OFF -DLEXBOR_BUILD_SHARED=OFF
/bin/sh: cmake: not found
make: *** [Makefile:42: c_src/lexbor/liblexbor_static.a] Error 127
could not compile dependency :fast_html, "mix compile" failed. You can recompile this dependency with "mix deps.compile fast_html", update it with "mix deps.update fast_html" or clean it with "mix deps.clean fast_html"
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

==> pleroma
The command '/bin/sh -c mix local.rebar --force     && mix local.hex --force     && mix deps.get     && mix compile' returned a non-zero code: 1

As I see someone reported about 2 weeks ago (the last issue) a successful build I am going to try stepping back a commit to work out which commit broke this.

No Admin FE settings: "You must enable configurable_from_database in your config file"

There are no admin settings in Admin FE. "Request failed with status code 400 - You must enable configurable_from_database in your config file."

Pleroma's own documentation on this is incredibly unclear, and I'm even more lost with containerization. Can I set this in config-override.exs? Is this something I need to do through docker exec?

Seems like admin settings shouldn't be anywhere near this difficult to use and I'm missing something obvious.

Unable to build Pleroma on latest develop commit

Pleroma build fails seemingly stating a missing dependency "crypt".

Generated http_signatures app
make: Entering directory '/pleroma/deps/crypt/c_src'
cc -DHAVE_CRYPT_R -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes -pedantic -fwrapv -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -Wconversion -Wshadow -Wpointer-arith -Wcast-qual -fPIC -I /usr/local/lib/erlang/erts-11.2.2.6/include/ -c -o /pleroma/deps/crypt/c_src/explicit_bzero.o /pleroma/deps/crypt/c_src/explicit_bzero.c
/pleroma/deps/crypt/c_src/explicit_bzero.c:35:54: error: 'bzero' undeclared here (not in a function)
   35 | static void (* volatile ssh_bzero)(void *, size_t) = bzero;
      |                                                      ^~~~~
make: *** [Makefile:61: /pleroma/deps/crypt/c_src/explicit_bzero.o] Error 1
make: Leaving directory '/pleroma/deps/crypt/c_src'
===> Hook for compile failed!

==> pleroma
** (Mix) Could not compile dependency :crypt, "/pleroma/.mix/rebar3 bare compile --paths="/pleroma/_build/prod/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile crypt", update it with "mix deps.update crypt" or clean it with "mix deps.clean crypt"
The command '/bin/sh -c mix local.rebar --force     && mix local.hex --force     && mix deps.get     && mix compile' returned a non-zero code: 1

Newest pleroma security update breaks fresh installation

According to new pleroma security update https://pleroma.social/announcements/2023/08/04/pleroma-security-release-2.5.3/

Pleroma is refusing to launch:
ERROR! Config provider Pleroma.Config.ReleaseRuntimeProvider failed with: ** (RuntimeError) Configuration at /etc/pleroma/config.exs has world-permissions, execute the following: chmod o= /etc/pleroma/config.exs lib/pleroma/config/release_runtime_provider.ex:27: Pleroma.Config.ReleaseRuntimeProvider.load/2 (elixir 1.11.4) lib/config/provider.ex:347: anonymous fn/2 in Config.Provider.run_providers/2 (elixir 1.11.4) lib/enum.ex:2193: Enum."-reduce/3-lists^foldl/2-0-"/3 (elixir 1.11.4) lib/config/provider.ex:204: Config.Provider.boot_providers/4 :init.eval_script/2 :init.do_boot/3
when I execute suggested command, pleroma once again crashes:
ERROR! Config provider Pleroma.Config.ReleaseRuntimeProvider failed with: ** (File.Error) could not read file "/etc/pleroma/config.exs": permission denied (elixir 1.11.4) lib/file.ex:355: File.read!/1 (elixir 1.11.4) lib/config/reader.ex:86: Config.Reader.read!/2 lib/pleroma/config/release_runtime_provider.ex:37: Pleroma.Config.ReleaseRuntimeProvider.load/2 (elixir 1.11.4) lib/config/provider.ex:347: anonymous fn/2 in Config.Provider.run_providers/2 (elixir 1.11.4) lib/enum.ex:2193: Enum."-reduce/3-lists^foldl/2-0-"/3 (elixir 1.11.4) lib/config/provider.ex:204: Config.Provider.boot_providers/4 :init.eval_script/2 :init.do_boot/3

I have made chown -R pleroma:pleroma . but it didn't help.

Static directory

Where should a docker volume/mount be to add files into static? Trying to replace the background and provide some themes but no luck so far :(

I thought it was meant to be /var/lib/pleroma/static but can't see that in the container at all so where is the default background stored?

Updating the Pleroma frontend

Hello, I really love this Docker image. It made the setup and maintenance very simple and easy.

I'm running into an issue: I'm trying to update the default pleroma-fe frontend. Now the PLEROMA_VER has been set to develop and it does properly compile the most recent commit, the frontend is seemingly stuck on a commit from about 5 months ago and I want to update that.

docker build -t pleroma . correctly updates to the latest Pleroma commit but not the pleroma-fe.

right now my versions are:

Backend version
2.5.52-305-gb08cbe76-develop

Frontend version
eec27700

How do I update the frontend? I can't seem to find guides that work with Docker.
Any help is appreciated and thanks again for making this project ❀️

Database hostname shouldn't be hardcoded

I run many containers so i don't want one to have such a generic name as "db".

I tried to change the postgres container's name in my docker-compose.yml and I set the new name here and rebuilt. When I launched pleroma the logs would indicate that it's still looking for "db" and failing.

When I change it back to "db" everything works again.

Is this name hardcoded somewhere?

"Pull access denied for Pleroma" when updating

I keep getting this error whenever I try to run docker-compose pull:

Pulling web ... error

ERROR: for web pull access denied for pleroma, repository does not exist or may require 'docker login'
ERROR: pull access denied for pleroma, repository does not exist or may require 'docker login'

I've already run docker login but that doesn't seem to be the solution

Web push keys

The README.md states the following:

Get your web push keys and copy them to secret.exs:

I have no idea what these "web push keys" are.
Can you elaborate pleasE?

Could this be a 2 step docker build

I recently started using 2 step docker builds for node based stuff. This way I have node, npm, and all the dependencies installed in my build container, but my final container only contains the code + node itself.

Anyway, I'm not really sure about the details of how elixir works. But I suspect that some of the stuff required for the build process isn't then required for the running container. My first question then, is that true?

If it is, would you be open to a PR which switches the docker file to use a 2 step approach? I can't promise I can make it work, or that I will submit a PR at all, but before I tried I wanted to check.

Postgres Authentication Fails

Hello,

I was just working through the guide when I stumbled across an authentication issue when trying to setup the database with the following:
docker-compose run --rm web mix ecto.migrate

I changed the POSTGRES_PASSWORD in the docker-compose.yml, and everything from that point to now has been okay. Please can you advise?

This is the output

Creating network "docker-pleroma_default" with the default driver
Creating pleroma_postgres ... done

03:56:34.309 [error] Postgrex.Protocol (#PID<0.527.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"

03:56:34.309 [error] Postgrex.Protocol (#PID<0.528.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"

03:56:36.074 [error] Postgrex.Protocol (#PID<0.527.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"

03:56:37.052 [error] Postgrex.Protocol (#PID<0.528.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "pleroma"

03:56:37.119 [error] Could not create schema migrations table. This error usually happens due to the following:

  * The database does not exist
  * The "schema_migrations" table, which Ecto uses for managing
    migrations, was defined by another library
  * There is a deadlock while migrating (such as using concurrent
    indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table for managing migrations:

    config :pleroma, Pleroma.Repo,
      migration_source: "some_other_table_for_schema_migrations"

The full error report is shown below.

** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2919ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

  1. By tracking down slow queries and making sure they are running fast enough
  2. Increasing the pool_size (albeit it increases resource consumption)
  3. Allow requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

    (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:593: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.10.4) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.4.5) lib/ecto/adapters/sql.ex:686: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.4.5) lib/ecto/migrator.ex:641: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.4.5) lib/ecto/migrator.ex:484: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.4.5) lib/ecto/migrator.ex:406: Ecto.Migrator.run/4
    (ecto_sql 3.4.5) lib/ecto/migrator.ex:142: Ecto.Migrator.with_repo/3
    (pleroma 2.1.50-854-g294628d9-develop) lib/mix/tasks/pleroma/ecto/migrate.ex:63: Mix.Tasks.Pleroma.Ecto.Migrate.run/1

Failed to compile with dependency:majicc

Basically, I tried to compile pleroma, and this has caused this one error regarding majicc. I gave it linux-headers in addition, but it's not compiling properly. Also would postgresql-13 be affecting it? should i go lower of a version?
The full screenshot is below
error
I'm on the latest version of Debian 10, docker and docker-compose are installed as well. This is in a VM.

Unable to upload files - 500 Insternal Server Error

I can view posts and my instance is federated properly, however if I try to change my avatar, background or profile banner, the image will not upload and I receive a 500 server error
Untitled

I've double checked and my uploads folders are properly configured as far as docker is concerned, even put a test file in via the CLI to make sure it showed on both ends.

How can I finally change my frontend?

Hello and thanks for the step-by-step walkthrough for hosting pleroma via docker-compose.

Unfortunately I am still struggling with changing the frontend:

  • I added
 config :pleroma, :frontends,
 primary: %{
   "name" => "fedi-fe",
   "ref" => "master"
 },
 admin: %{
   "name" => "admin",
   "ref" => "develop"
 }

both to the config.exs and to the config-override.exs

  • I put "fedi-fe" as "kenoma" under Primary in Admin FE
  • Before I of course unziped and copied the corresponding zip-files into ./static/frontends (e.g. ./static/frontends/kenoma/master)
  • I tried it with
    • docker-compose build again
    • docker-compose down and up -d again

But after all I always and forever get the pleroma default frontend. I also don't receive any valuable information regarding this with docker-compose logs -f ....

Do you have a hint for me, why I don't get the changes to affect the frontend?

And here an example what happens when I try to install by CMD

~ $ ./bin/pleroma_ctl frontend install kenoma --ref mybuild --file /var/lib/pler
oma/static/frontends/tmp/kenoma-master.zip 

20:54:40.658 [info]  Installing kenoma (mybuild) to /var/lib/pleroma/static/frontends/kenoma/mybuild
** (File.CopyError) could not copy recursively from "/var/lib/pleroma/static/frontends/tmp/dist" to "/var/lib/pleroma/static/frontends/kenoma/mybuild". /var/lib/pleroma/static/frontends/tmp/dist: no such file or directory
    (elixir 1.11.4) lib/file.ex:901: File.cp_r!/3
    lib/pleroma/frontend.ex:107: Pleroma.Frontend.install_frontend/3
    lib/pleroma/frontend.ex:39: Pleroma.Frontend.install/2
    (stdlib 3.14.2.2) erl_eval.erl:680: :erl_eval.do_apply/6
    (elixir 1.11.4) lib/code.ex:341: Code.eval_string_with_error_handling/3
~ $ 

I don't get why copying fails - expect there is no directory named dist of course ...

Broken Pipe

I seem to encounter a bit of a problem with those containers, after a certificate expiration, they can't communicate anymore and I receive an error "2023-02-07 20:32:21.642 UTC [63] LOG: could not send data to client: Broken pipe"

Any idea how to fix this?

cmake: not found

When I try to build `release/2.1.0/, it fails:

==> fast_html
# Sadly, build components separately seems to sporadically fail
cd c_src/lexbor; cmake -DLEXBOR_BUILD_SEPARATELY=OFF -DLEXBOR_BUILD_SHARED=OFF
/bin/sh: cmake: not found
make: *** [Makefile:42: c_src/lexbor/liblexbor_static.a] Error 127
could not compile dependency :fast_html, "mix compile" failed. You can recompile this dependency with "mix deps.compile fast_html", update it with "mix deps.update fast_html" or clean it with "mix deps.clean fast_html"
==> pleroma
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

Probably related: https://git.pleroma.social/pleroma/pleroma/-/issues/2058

If I read it wrong, build-essential that contains cmake was added upstram as a dependency for OTP releases.

Unable to add OAUTH module to Dockerfile

Hi, first of all thanks for this repository, allowed to get my instance up and running really quickly.

Now, I'd like to hook up Pleroma with my Keycloak instance and don't seem to be able to find a way to get the required module added to my Docker file.
My first challenge is that I have no idea how this whole Erlang/Elixier stuff is supposed to work. Should a module like Ueberauth get downloaded from a central repository, do I have to download it from GitHub, etc.? So I ended up trying several ways for a couple of hours and finally thought I might ask here.
Based on the recomendations here: https://docs-develop.pleroma.social/backend/configuration/cheatsheet/#authentication my current Dockerfile has got the following changes:

I added the OAUTH environment variable just in case.

ENV UID=911 GID=911 \
    OAUTH_CONSUMER_STRATEGIES=keycloak \
    MIX_ENV=prod

I am adding ueberauth_keycloak to a folder in /pleroma/dps like below, unfortunately it doesn't make a difference if it's there or not

RUN git clone https://github.com/Rukenshia/ueberauth_keycloak.git /pleroma/deps/ueberauth_keycloak

I modified the original RUN command like this

RUN OAUTH_CONSUMER_STRATEGIES="keycloak" mix local.rebar --force \
    && mix local.hex --force \
    && mix deps.get \
    && mix compile

The error is always…

Failed to fetch record for 'hexpm/ueberauth_keycloak' from registry (using cache instead)
This could be because the package does not exist, it was spelled incorrectly or you don't have permissions to it
** (Mix) No package with name ueberauth_keycloak (from: mix.exs) in registry

Does anyone have an idea how I can add ueberauth_keycloak (any OAuth plugin) to the registry?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.