From c115c60cceb83d7f01794a384568041063130d83 Mon Sep 17 00:00:00 2001 From: Hal Lesesne Date: Thu, 29 Apr 2021 13:04:18 -0400 Subject: [PATCH 1/4] Added support for SoapBox UI --- Dockerfile | 4 ++++ README.md | 2 ++ example/docker-compose.yml | 4 +++- run-pleroma.sh | 5 +++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e2db9e3..a1f8f54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,10 +40,14 @@ RUN mkdir -p /etc/pleroma /var/lib/pleroma/static /var/lib/pleroma/uploads && \ adduser --system --shell /bin/false --home /opt/pleroma --group pleroma && \ chown -vR pleroma /etc/pleroma /var/lib/pleroma + COPY --chown=pleroma:pleroma --from=unzip /opt/pleroma/ /opt/pleroma/ VOLUME [ "/etc/pleroma", "/var/lib/pleroma/uploads", "/var/lib/pleroma/static" ] +ADD https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/v1.2.3/download?job=build-production /tmp/soapbox-fe.zip +RUN chown pleroma /tmp/soapbox-fe.zip + USER pleroma COPY *.sh /opt/pleroma/bin/ diff --git a/README.md b/README.md index 27bd380..0b6474d 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ See the [documentation for `instance gen`](https://docs-develop.pleroma.social/b If you want to use RUM indexes, you need a [PostgreSQL container that supports them](https://github.com/jordemort/docker-postgres-rum/). +If you would like to use the [SoapBox UI](https://soapbox.pub/), you can set an environment variable USE_SOAPBOX to "y". + ## Persistence If you want your instance data to persist properly, you need to mount volumes on the following directories: diff --git a/example/docker-compose.yml b/example/docker-compose.yml index ab67b0d..670b513 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -1,3 +1,4 @@ +version: '3.7' services: pleroma: @@ -7,7 +8,7 @@ services: networks: pleromanet: ports: - - 127.0.0.1:4000:4000 + - 4000:4000 volumes: - config:/etc/pleroma - uploads:/var/lib/pleroma/uploads @@ -16,6 +17,7 @@ services: DOMAIN: localhost ADMIN_EMAIL: chicken@example.com USE_RUM: "y" + USE_SOAPBOX: "n" POSTGRES_PASSWORD: hunter2 postgres: diff --git a/run-pleroma.sh b/run-pleroma.sh index f772448..0d8bc9f 100755 --- a/run-pleroma.sh +++ b/run-pleroma.sh @@ -17,4 +17,9 @@ if [ "${USE_RUM:-n}" = "y" ] ; then pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/ fi +if [ "${USE_SOAPBOX:-n}" = "y" ]; then + unzip -o /tmp/soapbox-fe.zip -d /var/lib/pleroma + rm /tmp/soapbox-fe.zip +fi + exec pleroma start From 6677d69176e24ec05f8d02ca13b2d68a835d36e6 Mon Sep 17 00:00:00 2001 From: Hal Lesesne Date: Thu, 29 Apr 2021 13:12:37 -0400 Subject: [PATCH 2/4] Removed some unnecessary whitespace I'd introduced. --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a1f8f54..6263476 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,6 @@ RUN mkdir -p /etc/pleroma /var/lib/pleroma/static /var/lib/pleroma/uploads && \ adduser --system --shell /bin/false --home /opt/pleroma --group pleroma && \ chown -vR pleroma /etc/pleroma /var/lib/pleroma - COPY --chown=pleroma:pleroma --from=unzip /opt/pleroma/ /opt/pleroma/ VOLUME [ "/etc/pleroma", "/var/lib/pleroma/uploads", "/var/lib/pleroma/static" ] From 6ca6714f6ab52442b88e61dd73b6eb2459eddfdd Mon Sep 17 00:00:00 2001 From: Hal Lesesne Date: Thu, 29 Apr 2021 13:13:58 -0400 Subject: [PATCH 3/4] Added back the loopback to the port definition --- example/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/docker-compose.yml b/example/docker-compose.yml index 670b513..7cd3e84 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -8,7 +8,7 @@ services: networks: pleromanet: ports: - - 4000:4000 + - 127.0.0.1:4000:4000 volumes: - config:/etc/pleroma - uploads:/var/lib/pleroma/uploads From fef37f7dd8ae418c4ce7ed38382af77ac783fe2f Mon Sep 17 00:00:00 2001 From: Hal Lesesne Date: Thu, 29 Apr 2021 16:05:11 -0400 Subject: [PATCH 4/4] Readme and docker-compose update --- README.md | 3 ++- example/docker-compose.yml | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b6474d..fa28042 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,12 @@ The container will try to infer reasonable defaults for the rest of the variable | `--anonymize-uploads` | `ANONYMIZE_UPLOADS` | y | | `--dedupe-uploads` | `DEDUPE_UPLOADS` | y | + See the [documentation for `instance gen`](https://docs-develop.pleroma.social/backend/administration/CLI_tasks/instance/) for more information. If you want to use RUM indexes, you need a [PostgreSQL container that supports them](https://github.com/jordemort/docker-postgres-rum/). -If you would like to use the [SoapBox UI](https://soapbox.pub/), you can set an environment variable USE_SOAPBOX to "y". +If you would like to use the [SoapBox UI](https://soapbox.pub/) instead of the normal Pleroma UI, you can set an environment variable USE_SOAPBOX to "y". SoapBox is a alternative to the normal Pleroma UI and emphasizes easier private branding and theming. ## Persistence diff --git a/example/docker-compose.yml b/example/docker-compose.yml index 7cd3e84..7b77968 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.7' services: pleroma: