Compare commits
213 commits
shigusegub
...
shigusegub
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58770d732d | ||
|
|
521fc70e48 | ||
|
|
f4a8c426df | ||
|
|
6439a5b334 | ||
|
|
0b813b9c4a | ||
|
|
029994aa75 | ||
|
|
820a4cd97c | ||
|
|
ad5bb02bd6 | ||
|
|
cb389e788d | ||
|
|
ba280b2d0f | ||
|
|
861a9f9365 | ||
|
|
519ef4be5e | ||
|
|
f6c410b06c | ||
|
|
f16dad2879 | ||
|
|
421187dbfa | ||
|
|
ac6ec02725 | ||
|
|
af4bed50e6 | ||
|
|
033083d1d1 | ||
|
|
343e42126a | ||
|
|
b2be7d48bc | ||
|
|
02185ec711 | ||
|
|
7283d4f9be | ||
|
|
6a81e4fe00 | ||
|
|
520bac27dc | ||
|
|
5068e31583 | ||
|
|
c07506ab6e | ||
|
|
3d7d119782 | ||
|
|
b013ec9123 | ||
|
|
7ce7d4d319 | ||
|
|
33b8ccf21f | ||
|
|
b552c25039 | ||
|
|
72fea0c901 | ||
|
|
1085f6d7cd | ||
|
|
89ac0b8f0a | ||
|
|
65456aed12 | ||
|
|
5600634574 | ||
|
|
e40bedc601 | ||
|
|
8936066427 | ||
|
|
71a4b8d0f2 | ||
|
|
f2ad6100f2 | ||
|
|
500340fc82 | ||
|
|
b85507c764 | ||
|
|
01d94a0135 | ||
|
|
8d82808d7a | ||
|
|
baa8004a2a | ||
|
|
d380bdd2f9 | ||
|
|
82a65328c2 | ||
|
|
4808c9824e | ||
|
|
63b82091d9 | ||
|
|
7f121afaba | ||
|
|
74cda5b78f | ||
|
|
4e05e7a989 | ||
|
|
77119d9368 | ||
|
|
fcfe16340a | ||
|
|
8b249431da | ||
|
|
c775b4876d | ||
|
|
bf5b097cd2 | ||
|
|
3e1b210486 | ||
|
|
2561febffd | ||
|
|
d65bdde809 | ||
|
|
5a80729986 | ||
|
|
034189afc8 | ||
|
|
7861ac27f2 | ||
|
|
6f38915198 | ||
|
|
d8eb741b6d | ||
|
|
af4be5623e | ||
|
|
3d2067d433 | ||
|
|
7a84ae4548 | ||
|
|
5848ef137f | ||
|
|
b1b41e8be1 | ||
|
|
82e4c5d077 | ||
|
|
337d047c4d | ||
|
|
a5048c270e | ||
|
|
303db126a8 | ||
|
|
dd35bf93c7 | ||
|
|
c525496e75 | ||
|
|
78697ad23a | ||
|
|
bffa258a23 |
||
|
|
2436c9d61d |
||
|
|
5ebabcd582 |
||
|
|
44eb648179 |
||
|
|
fca6a7933e |
||
|
|
01eafc0372 |
||
|
|
05beada21b |
||
|
|
f8b01788eb |
||
|
|
8f252fd99b |
||
|
|
2c70857f9f |
||
|
|
26b499eca0 |
||
|
|
ebcac09f5c |
||
|
|
3bb384d378 |
||
|
|
44cea92fbc |
||
|
|
52c81cdf68 |
||
|
|
34cf4222c1 |
||
|
|
5df951f670 |
||
|
|
32e284ed2c |
||
|
|
f89874596e |
||
|
|
f8b420932e |
||
|
|
1cb39bfb90 |
||
|
|
63f8c33353 |
||
|
|
029a1045d4 |
||
|
|
14a26e4433 |
||
|
|
6d26ce54c4 |
||
|
|
1a6ab18ebc |
||
|
|
06cc4ad7fd |
||
|
|
a3b7c1da4f |
||
|
|
cca63d707d |
||
|
|
4bcdf0cf4f |
||
|
|
2f9a098dd5 |
||
|
|
e47c6a2445 |
||
|
|
72a0236c9a |
||
|
|
57e4e43042 |
||
|
|
efd6d40a40 |
||
|
|
b9c10c61b7 |
||
|
|
bc2ffd0c16 |
||
|
|
a938a96ae8 |
||
|
|
fe5b8cbe05 |
||
|
|
f95cad4603 |
||
|
|
d10408558e |
||
|
|
5fdf4d1b1c |
||
|
|
f01e2d0902 |
||
|
|
2c17d29c4b |
||
|
|
4c90f39e14 |
||
|
|
f39a86344c |
||
|
|
00a9eae74a | ||
|
|
ab0ddda321 | ||
|
|
ece1f7bca6 | ||
|
|
f72beb6c26 | ||
|
|
5f29bf2e4f | ||
|
|
e2eeded539 | ||
|
|
447bfcdb35 | ||
|
|
550693111e | ||
|
|
83e4a112b9 | ||
|
|
46c4d3b80f | ||
|
|
d08362cb30 | ||
|
|
aa38f1da41 | ||
|
|
0613478bdb | ||
|
|
31115e24c0 | ||
|
|
d860aa32f7 | ||
|
|
9916734b76 | ||
|
|
78c21efa1e | ||
|
|
a756ec71a7 | ||
|
|
a5fab1c8af | ||
|
|
e7aebdf7b6 | ||
|
|
697397e2b8 | ||
|
|
d5afe8a884 | ||
|
|
1f3c8cf707 | ||
|
|
5f23876552 | ||
|
|
461c465fe7 | ||
|
|
4174bc6126 | ||
|
|
605d542a7c | ||
|
|
6d93391dee | ||
|
|
34272773b0 | ||
|
|
080416f175 | ||
|
|
e131678d69 | ||
|
|
0e72fdac6e | ||
|
|
593edd3c41 | ||
|
|
ce6f690a85 | ||
|
|
aba9162994 | ||
|
|
b30d2ed0e6 | ||
|
|
8676f39421 | ||
|
|
f20479ded8 | ||
|
|
2a06b66daf | ||
|
|
f9b13c754c | ||
|
|
74db8f4769 | ||
|
|
5ca35e1251 | ||
|
|
dfad261302 | ||
|
|
eb00fea508 | ||
|
|
239f4d56bd | ||
|
|
192426b485 | ||
|
|
43ea736c37 | ||
|
|
830e18a702 | ||
|
|
0dd79c283c | ||
|
|
c8b2534245 | ||
|
|
ae4d15503b | ||
|
|
2faac1cc48 | ||
|
|
f0e2fb1609 | ||
|
|
e7ff752c52 | ||
|
|
733b53748c | ||
|
|
a506b7e1d7 | ||
|
|
232dd79341 | ||
|
|
10d743e46a | ||
|
|
5015d517d0 | ||
|
|
217efb4ce0 | ||
|
|
325c4b0a9f | ||
|
|
4069f6430d | ||
|
|
22bb706770 | ||
|
|
5f41c54d8c | ||
|
|
3af3e07312 | ||
|
|
c7ccd43500 | ||
|
|
580787d360 | ||
|
|
9bb34a12eb | ||
|
|
a9eb20e2db | ||
|
|
66185ad957 | ||
|
|
f95b354c3d | ||
|
|
af8a7d8fd8 | ||
|
|
ae07bb4779 | ||
|
|
f1bb6b6bc4 | ||
|
|
37aa9a63b0 | ||
|
|
f314d1b9d5 | ||
|
|
6cf02b501a | ||
|
|
4349a83b9d | ||
|
|
f077d41b12 | ||
|
|
08ab82cf0b | ||
|
|
bc0f261f72 | ||
|
|
d5e4b906c9 | ||
|
|
5720cf286c | ||
|
|
5379db3194 | ||
|
|
dae06c0944 | ||
|
|
00296406fa | ||
|
|
2c15ffb421 | ||
|
|
21e6c1dfcb | ||
|
|
d5f36acd13 | ||
|
|
fe8ec1b6f9 |
1113 changed files with 4965 additions and 33489 deletions
|
|
@ -1,25 +0,0 @@
|
||||||
name: 'Bug report'
|
|
||||||
about: 'Report a bug in Pleroma'
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
### Precheck
|
|
||||||
|
|
||||||
* For support use https://git.pleroma.social/pleroma/pleroma-support or [community channels](https://git.pleroma.social/pleroma/pleroma#community-channels).
|
|
||||||
* Please do a quick search to ensure no similar bug has been reported before. If the bug has not been addressed after 2 weeks, it's fine to bump it.
|
|
||||||
* Try to ensure that the bug is actually related to the Pleroma backend. For example, if a bug happens in Pleroma-FE but not in Mastodon-FE or mobile clients, it's likely that the bug should be filed in [Pleroma-FE](https://git.pleroma.social/pleroma/pleroma-fe/issues/new) repository.
|
|
||||||
- type: textarea
|
|
||||||
id: environment
|
|
||||||
attributes:
|
|
||||||
label: Environment
|
|
||||||
value: |
|
|
||||||
* Installation type (OTP or From Source):
|
|
||||||
* Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE):
|
|
||||||
* Elixir version (`elixir -v` for from source installations, N/A for OTP):
|
|
||||||
* Operating system:
|
|
||||||
* PostgreSQL version (`psql -V`):
|
|
||||||
- type: textarea
|
|
||||||
id: bug-description
|
|
||||||
attributes:
|
|
||||||
label: Bug description
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
### Checklist
|
|
||||||
|
|
||||||
- [ ] Adding a changelog: In the `changelog.d` directory, create a file named `<code>.<type>`.
|
|
||||||
|
|
||||||
<!--
|
|
||||||
`<code>` can be anything, but we recommend using a more or less unique identifier to avoid collisions, such as the branch name.
|
|
||||||
|
|
||||||
`<type>` can be `add`, `change`, `remove`, `fix`, `security` or `skip`. `skip` is only used if there is no user-visible change in the PR (for example, only editing comments in the code). Otherwise, choose a type that corresponds to your change.
|
|
||||||
|
|
||||||
In the file, write the changelog entry. For example, if a PR adds group functionality, we can create a file named `group.add` and write `Add group functionality` in it.
|
|
||||||
|
|
||||||
If one changelog entry is not enough, you may add more. But that might mean you can split it into two PRs. Only use more than one changelog entry if you really need to (for example, when one change in the code fix two different bugs, or when refactoring).
|
|
||||||
-->
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -56,9 +56,6 @@ pleroma.iml
|
||||||
# asdf
|
# asdf
|
||||||
.tool-versions
|
.tool-versions
|
||||||
|
|
||||||
# mise
|
|
||||||
mise.toml
|
|
||||||
|
|
||||||
# Editor temp files
|
# Editor temp files
|
||||||
*~
|
*~
|
||||||
*#
|
*#
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
evaluate: 'CI_COMMIT_SOURCE_BRANCH != "weblate"'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
check-changelog:
|
|
||||||
image: docker.io/alpine:3.23
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache git
|
|
||||||
- sh ./tools/check-changelog
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**", "Dockerfile" ]
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
skip_clone: true
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
docker-develop-combine:
|
|
||||||
image: &docker_image git.pleroma.social/phnt/wpc-docker-tagger:0.9.1
|
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
settings: &docker_settings
|
|
||||||
registry: "git.pleroma.social"
|
|
||||||
image: "pleroma/pleroma"
|
|
||||||
architectures: [amd64, arm64, armv7]
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- develop
|
|
||||||
- "${CI_COMMIT_SHA:0:8}"
|
|
||||||
username:
|
|
||||||
from_secret: pleroma-ci-user
|
|
||||||
password:
|
|
||||||
from_secret: pleroma-ci-password
|
|
||||||
|
|
||||||
docker-stable-combine:
|
|
||||||
image: *docker_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG == ""'
|
|
||||||
settings:
|
|
||||||
<<: *docker_settings
|
|
||||||
tags: &stable_docker_tags
|
|
||||||
- latest
|
|
||||||
- stable
|
|
||||||
- "${CI_COMMIT_SHA:0:8}"
|
|
||||||
|
|
||||||
docker-stable-tag-combine:
|
|
||||||
image: *docker_image
|
|
||||||
when:
|
|
||||||
- event: tag
|
|
||||||
- evaluate: 'CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG != ""'
|
|
||||||
settings:
|
|
||||||
<<: *docker_settings
|
|
||||||
tags:
|
|
||||||
- <<: *stable_docker_tags
|
|
||||||
- "${CI_COMMIT_TAG}"
|
|
||||||
|
|
@ -1,150 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**", "Dockerfile" ]
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
- linux/arm
|
|
||||||
|
|
||||||
# This is needed for the when clauses below.
|
|
||||||
labels:
|
|
||||||
platform: ${platform}
|
|
||||||
memory: 'high'
|
|
||||||
|
|
||||||
variables:
|
|
||||||
docker_variables: &docker_variables
|
|
||||||
repo: pleroma/pleroma
|
|
||||||
registry: git.pleroma.social
|
|
||||||
username:
|
|
||||||
from_secret: pleroma-ci-user
|
|
||||||
password:
|
|
||||||
from_secret: pleroma-ci-password
|
|
||||||
armv7_docker_variables: &armv7_docker_variables
|
|
||||||
<<: *docker_variables
|
|
||||||
build_args:
|
|
||||||
- ELIXIR_IMG=docker.io/arm32v7/elixir
|
|
||||||
- ELIXIR_TAG=1.17.3-otp-27-alpine
|
|
||||||
- ALPINE_IMG=docker.io/arm32v7/alpine
|
|
||||||
- ALPINE_VER=3.20
|
|
||||||
extra_opts: --custom-platform=linux/arm/v7
|
|
||||||
kaniko_image: &kaniko_image docker.io/woodpeckerci/plugin-kaniko:2.3.2
|
|
||||||
|
|
||||||
steps:
|
|
||||||
docker-develop-amd64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
tags:
|
|
||||||
- latest-amd64
|
|
||||||
- develop-amd64
|
|
||||||
- ${CI_COMMIT_SHA:0:8}-amd64
|
|
||||||
|
|
||||||
docker-develop-arm64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
tags:
|
|
||||||
- latest-arm64
|
|
||||||
- develop-arm64
|
|
||||||
- ${CI_COMMIT_SHA:0:8}-arm64
|
|
||||||
|
|
||||||
docker-develop-armv7:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
settings:
|
|
||||||
<<: *armv7_docker_variables
|
|
||||||
tags:
|
|
||||||
- latest-armv7
|
|
||||||
- develop-armv7
|
|
||||||
- ${CI_COMMIT_SHA:0:8}-armv7
|
|
||||||
|
|
||||||
docker-stable-amd64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG == ""'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
tags: &amd64_tags
|
|
||||||
- latest-amd64
|
|
||||||
- stable-amd64
|
|
||||||
- ${CI_COMMIT_SHA:0:8}-amd64
|
|
||||||
|
|
||||||
# FE workflow runs only on linux/amd64
|
|
||||||
docker-stable-e2e-amd64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
dockerfile: Dockerfile-e2e
|
|
||||||
tags:
|
|
||||||
- stable-e2e
|
|
||||||
|
|
||||||
docker-stable-tag-amd64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG != ""'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
tags:
|
|
||||||
- <<: *amd64_tags
|
|
||||||
- ${CI_COMMIT_TAG}-amd64
|
|
||||||
|
|
||||||
docker-stable-arm64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG == ""'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
tags: &arm64_tags
|
|
||||||
- latest-arm64
|
|
||||||
- stable-arm64
|
|
||||||
- ${CI_COMMIT_SHA:0:8}-arm64
|
|
||||||
|
|
||||||
docker-stable-tag-arm64:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG != ""'
|
|
||||||
settings:
|
|
||||||
<<: *docker_variables
|
|
||||||
tags:
|
|
||||||
- <<: *arm64_tags
|
|
||||||
- ${CI_COMMIT_TAG}-arm64
|
|
||||||
|
|
||||||
docker-stable-armv7:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG == ""'
|
|
||||||
settings:
|
|
||||||
<<: *armv7_docker_variables
|
|
||||||
tags: &armv7_tags
|
|
||||||
- latest-armv7
|
|
||||||
- stable-armv7
|
|
||||||
- ${CI_COMMIT_SHA:0:8}-armv7
|
|
||||||
|
|
||||||
docker-stable-tag-armv7:
|
|
||||||
image: *kaniko_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable" && CI_COMMIT_TAG != ""'
|
|
||||||
settings:
|
|
||||||
<<: *armv7_docker_variables
|
|
||||||
tags:
|
|
||||||
- <<: *armv7_tags
|
|
||||||
- ${CI_COMMIT_TAG}-armv7
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "docs/**" ]
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
evaluate: 'CI_COMMIT_BRANCH == "stable" || CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
skip_clone: true
|
|
||||||
|
|
||||||
variables:
|
|
||||||
trigger_settings: &trigger_settings
|
|
||||||
deploy: 'docs'
|
|
||||||
last-successful: true
|
|
||||||
token:
|
|
||||||
from_secret: pleroma-ci-woodpecker-token
|
|
||||||
repositories:
|
|
||||||
- pleroma/docs@master
|
|
||||||
docker_image: &docker_image docker.io/woodpeckerci/plugin-trigger:1.1.1
|
|
||||||
|
|
||||||
steps:
|
|
||||||
trigger-deploy-stable:
|
|
||||||
when:
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
image: *docker_image
|
|
||||||
settings:
|
|
||||||
<<: *trigger_settings
|
|
||||||
params:
|
|
||||||
- BRANCH=stable
|
|
||||||
|
|
||||||
trigger-deploy-develop:
|
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
image: *docker_image
|
|
||||||
settings:
|
|
||||||
<<: *trigger_settings
|
|
||||||
params:
|
|
||||||
- BRANCH=develop
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
evaluate: 'CI_COMMIT_SOURCE_BRANCH != "weblate"'
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
mix-format:
|
|
||||||
image: &elixir-image
|
|
||||||
docker.io/elixir:1.17-otp-27-alpine
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
failure: ignore
|
|
||||||
commands:
|
|
||||||
- |
|
|
||||||
if ! mix format --check-formatted; then
|
|
||||||
touch fail.stamp
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
credo:
|
|
||||||
image: *elixir-image
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
failure: ignore
|
|
||||||
environment:
|
|
||||||
MIX_ENV: test
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache build-base cmake exiftool ffmpeg file-dev git openssl
|
|
||||||
- adduser -D -h /home/testuser testuser
|
|
||||||
- mkdir -p /home/testuser/.mix /home/testuser/.hex
|
|
||||||
- chown -R testuser:testuser . /home/testuser
|
|
||||||
- su testuser -c "HOME=/home/testuser mix local.hex --force"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix local.rebar --force"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix deps.get"
|
|
||||||
- |
|
|
||||||
if ! su testuser -c "HOME=/home/testuser mix analyze"; then
|
|
||||||
touch fail.stamp
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# cycles:
|
|
||||||
# image: *elixir-image
|
|
||||||
# failure: ignore
|
|
||||||
# commands:
|
|
||||||
# - apk add --no-cache build-base cmake exiftool ffmpeg file-dev git openssl
|
|
||||||
# - adduser -D -h /home/testuser testuser
|
|
||||||
# - mkdir -p /home/testuser/.mix /home/testuser/.hex
|
|
||||||
# - chown -R testuser:testuser . /home/testuser
|
|
||||||
# - su testuser -c "HOME=/home/testuser mix local.hex --force"
|
|
||||||
# - su testuser -c "HOME=/home/testuser mix local.rebar --force"
|
|
||||||
# - su testuser -c "HOME=/home/testuser mix compile"
|
|
||||||
# - |
|
|
||||||
# if ! su testuser -c "HOME=/home/testuser mix xref graph --format cycles --label compile | awk '{print $0} END{exit ($0 != \"No cycles found\")}'"; then
|
|
||||||
# touch fail.stamp
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
ensure-status:
|
|
||||||
image: *elixir-image
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
commands: |
|
|
||||||
if test -f fail.stamp; then
|
|
||||||
echo "One or more previous steps fails. Failing workflow..."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "All steps passed"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
@ -1,292 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm
|
|
||||||
- linux/arm64
|
|
||||||
|
|
||||||
# This is needed for the when clauses below.
|
|
||||||
# When the platform clause is fixed, this might not be needed anymore
|
|
||||||
labels:
|
|
||||||
platform: ${platform}
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
build_cmds: &build_cmds
|
|
||||||
- apk add git build-base cmake file-dev openssl vips-dev zip
|
|
||||||
- echo "import Config" > config/prod.secret.exs
|
|
||||||
- mix local.hex --force
|
|
||||||
- mix local.rebar --force
|
|
||||||
- mix deps.get --only prod
|
|
||||||
- mkdir release
|
|
||||||
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
|
|
||||||
- mix release --path release
|
|
||||||
build_image_amd64: &build_image_amd64 docker.io/hexpm/elixir:1.17.3-erlang-27.3.4.17-alpine-3.22.5
|
|
||||||
build_image_arm: &build_image_arm docker.io/arm32v7/elixir:1.17.3-alpine
|
|
||||||
build_image_arm64: &build_image_arm64 docker.io/hexpm/elixir:1.17.3-erlang-27.3.4.17-alpine-3.22.5
|
|
||||||
artifacts_uploader_image: &artifacts_uploader_image docker.io/woodpeckercommunity/plugin-gitea-package:0.5.1
|
|
||||||
artifacts_uploader_settings: &artifacts_uploader_settings
|
|
||||||
user:
|
|
||||||
from_secret: pleroma-ci-user
|
|
||||||
password:
|
|
||||||
from_secret: pleroma-ci-password
|
|
||||||
owner: 'pleroma'
|
|
||||||
env: &env
|
|
||||||
MIX_ENV: prod
|
|
||||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
|
|
||||||
steps:
|
|
||||||
otp-develop-amd64-musl:
|
|
||||||
image: *build_image_amd64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
environment: *env
|
|
||||||
commands: &amd64_build
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64-musl.zip release
|
|
||||||
|
|
||||||
otp-stable-amd64-musl:
|
|
||||||
image: *build_image_amd64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
environment: *env
|
|
||||||
commands: *amd64_build
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
otp-stable-tag-amd64-musl:
|
|
||||||
image: *build_image_amd64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
environment: *env
|
|
||||||
commands:
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq stable-${CI_COMMIT_SHA:0:8}-amd64-musl.zip release
|
|
||||||
|
|
||||||
otp-develop-arm-musl:
|
|
||||||
image: *build_image_arm
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
environment: *env
|
|
||||||
commands: &arm_build
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm-musl.zip release
|
|
||||||
|
|
||||||
otp-stable-arm-musl:
|
|
||||||
image: *build_image_arm
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
environment: *env
|
|
||||||
commands: *arm_build
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
otp-stable-tag-arm-musl:
|
|
||||||
image: *build_image_arm
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
environment: *env
|
|
||||||
commands:
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq stable-${CI_COMMIT_SHA:0:8}-arm-musl.zip release
|
|
||||||
|
|
||||||
otp-develop-arm64-musl:
|
|
||||||
image: *build_image_arm64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
environment: *env
|
|
||||||
commands: &arm64_build
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64-musl.zip release
|
|
||||||
|
|
||||||
otp-stable-arm64-musl:
|
|
||||||
image: *build_image_arm64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
environment: *env
|
|
||||||
commands: *arm64_build
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
otp-stable-tag-arm64-musl:
|
|
||||||
image: *build_image_arm64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
environment: *env
|
|
||||||
commands:
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq stable-${CI_COMMIT_SHA:0:8}-arm64-musl.zip release
|
|
||||||
|
|
||||||
upload-artifacts-amd64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-amd64-musl
|
|
||||||
package_version: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64-musl
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64-musl.zip
|
|
||||||
file_name: pleroma-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64-musl.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-latest-amd64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-amd64-musl
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64-musl.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-artifacts-tag-amd64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-amd64-musl
|
|
||||||
package_version: stable-${CI_COMMIT_SHA:0:8}-amd64-musl
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-amd64-musl.zip
|
|
||||||
file_name: pleroma-stable-${CI_COMMIT_SHA:0:8}-amd64-musl.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-latest-tag-amd64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-amd64-musl
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-amd64-musl.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-artifacts-arm-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm-musl
|
|
||||||
package_version: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm-musl
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm-musl.zip
|
|
||||||
file_name: pleroma-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm-musl.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-latest-arm-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm-musl
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm-musl.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-artifacts-tag-arm-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm-musl
|
|
||||||
package_version: stable-${CI_COMMIT_SHA:0:8}-arm-musl
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm-musl.zip
|
|
||||||
file_name: pleroma-stable-${CI_COMMIT_SHA:0:8}-arm-musl.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-latest-tag-arm-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm-musl
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm-musl.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-artifacts-arm64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm64-musl
|
|
||||||
package_version: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64-musl
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64-musl.zip
|
|
||||||
file_name: pleroma-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64-musl.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-latest-arm64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm64-musl
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64-musl.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-artifacts-tag-arm64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm64-musl
|
|
||||||
package_version: stable-${CI_COMMIT_SHA:0:8}-arm64-musl
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm64-musl.zip
|
|
||||||
file_name: pleroma-stable-${CI_COMMIT_SHA:0:8}-arm64-musl.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-latest-tag-arm64-musl:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm64-musl
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm64-musl.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
@ -1,293 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm
|
|
||||||
- linux/arm64
|
|
||||||
|
|
||||||
# This is needed for the when clauses below.
|
|
||||||
# When the platform clause is fixed, this might not be needed anymore
|
|
||||||
labels:
|
|
||||||
platform: ${platform}
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
build_cmds: &build_cmds
|
|
||||||
- apt-get update && apt-get install -y cmake libmagic-dev libvips-dev erlang-dev git build-essential zip
|
|
||||||
- echo "import Config" > config/prod.secret.exs
|
|
||||||
- mix local.hex --force
|
|
||||||
- mix local.rebar --force
|
|
||||||
- mix deps.get --only prod
|
|
||||||
- mkdir release
|
|
||||||
- export PLEROMA_BUILD_BRANCH=${CI_COMMIT_BRANCH}
|
|
||||||
- mix release --path release
|
|
||||||
build_image_amd64: &build_image_amd64 docker.io/hexpm/elixir:1.17.3-erlang-27.3.4.17-ubuntu-noble-20260810
|
|
||||||
build_image_arm: &build_image_arm docker.io/arm32v7/elixir:1.17.3
|
|
||||||
build_image_arm64: &build_image_arm64 docker.io/hexpm/elixir:1.17.3-erlang-27.3.4.17-ubuntu-noble-20260810
|
|
||||||
artifacts_uploader_image: &artifacts_uploader_image docker.io/woodpeckercommunity/plugin-gitea-package:0.5.1
|
|
||||||
artifacts_uploader_settings: &artifacts_uploader_settings
|
|
||||||
user:
|
|
||||||
from_secret: pleroma-ci-user
|
|
||||||
password:
|
|
||||||
from_secret: pleroma-ci-password
|
|
||||||
owner: 'pleroma'
|
|
||||||
env: &env
|
|
||||||
MIX_ENV: prod
|
|
||||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
|
|
||||||
steps:
|
|
||||||
otp-develop-amd64:
|
|
||||||
image: *build_image_amd64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
environment: *env
|
|
||||||
commands: &amd64_build
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64.zip release
|
|
||||||
|
|
||||||
otp-stable-amd64:
|
|
||||||
image: *build_image_amd64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
environment: *env
|
|
||||||
commands: *amd64_build
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
otp-stable-tag-amd64:
|
|
||||||
image: *build_image_amd64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
environment: *env
|
|
||||||
commands:
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq stable-${CI_COMMIT_SHA:0:8}-amd64.zip release
|
|
||||||
|
|
||||||
otp-develop-arm:
|
|
||||||
image: *build_image_arm
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
environment: *env
|
|
||||||
commands: &arm_build
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm.zip release
|
|
||||||
|
|
||||||
otp-stable-arm:
|
|
||||||
image: *build_image_arm
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
environment: *env
|
|
||||||
commands: *arm_build
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
otp-stable-tag-arm:
|
|
||||||
image: *build_image_arm
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
environment: *env
|
|
||||||
commands:
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq stable-${CI_COMMIT_SHA:0:8}-arm.zip release
|
|
||||||
|
|
||||||
otp-develop-arm64:
|
|
||||||
image: *build_image_arm64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
environment: *env
|
|
||||||
commands: &arm64_build
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64.zip release
|
|
||||||
|
|
||||||
otp-stable-arm64:
|
|
||||||
image: *build_image_arm64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual" && CI_COMMIT_BRANCH == "stable"'
|
|
||||||
environment: *env
|
|
||||||
commands: *arm64_build
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
otp-stable-tag-arm64:
|
|
||||||
image: *build_image_arm64
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
environment: *env
|
|
||||||
commands:
|
|
||||||
- <<: *build_cmds
|
|
||||||
- zip -9rq stable-${CI_COMMIT_SHA:0:8}-arm64.zip release
|
|
||||||
|
|
||||||
upload-artifacts-amd64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-amd64
|
|
||||||
package_version: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64.zip
|
|
||||||
file_name: pleroma-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-latest-amd64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-amd64
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-amd64.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-artifacts-tag-amd64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-amd64
|
|
||||||
package_version: stable-${CI_COMMIT_SHA:0:8}-amd64
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-amd64.zip
|
|
||||||
file_name: pleroma-stable-${CI_COMMIT_SHA:0:8}-amd64.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-latest-tag-amd64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-amd64
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-amd64.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-artifacts-arm:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm
|
|
||||||
package_version: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm.zip
|
|
||||||
file_name: pleroma-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-latest-arm:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-artifacts-tag-arm:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm
|
|
||||||
package_version: stable-${CI_COMMIT_SHA:0:8}-arm
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm.zip
|
|
||||||
file_name: pleroma-stable-${CI_COMMIT_SHA:0:8}-arm.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-latest-tag-arm:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-artifacts-arm64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm64
|
|
||||||
package_version: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64.zip
|
|
||||||
file_name: pleroma-${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
upload-latest-arm64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "${CI_REPO_DEFAULT_BRANCH}"'
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "manual"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-${CI_COMMIT_BRANCH}-arm64
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:8}-arm64.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-artifacts-tag-arm64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm64
|
|
||||||
package_version: stable-${CI_COMMIT_SHA:0:8}-arm64
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm64.zip
|
|
||||||
file_name: pleroma-stable-${CI_COMMIT_SHA:0:8}-arm64.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
||||||
# Tag events don't have CI_COMMIT_BRANCH set, hardcode stable
|
|
||||||
upload-latest-tag-arm64:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
when:
|
|
||||||
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_name: pleroma-otp-stable-arm64
|
|
||||||
package_version: latest
|
|
||||||
file_source: ./stable-${CI_COMMIT_SHA:0:8}-arm64.zip
|
|
||||||
file_name: pleroma.zip
|
|
||||||
update: 'true'
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
path:
|
|
||||||
- ".woodpecker/**"
|
|
||||||
- "lib/pleroma/search/**"
|
|
||||||
- "test/pleroma/search/**"
|
|
||||||
- "mix.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
evaluate: 'CI_COMMIT_SOURCE_BRANCH != "weblate"'
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path:
|
|
||||||
- ".woodpecker/**"
|
|
||||||
- "lib/pleroma/search/**"
|
|
||||||
- "test/pleroma/search/**"
|
|
||||||
- "mix.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- lint
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
paradedb-integration:
|
|
||||||
image: docker.io/elixir:1.19-otp-28-alpine
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
environment:
|
|
||||||
MIX_ENV: test
|
|
||||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
DB_HOST: postgres
|
|
||||||
DB_PORT: 5432
|
|
||||||
PARADEDB_TEST_URL: postgres://postgres:postgres@paradedb:5432/paradedb
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache build-base cmake exiftool ffmpeg vips-dev file-dev git openssl postgresql-client
|
|
||||||
- mix local.hex --force
|
|
||||||
- mix local.rebar --force
|
|
||||||
- mix deps.get
|
|
||||||
- timeout 60 sh -c 'until pg_isready -h postgres -U postgres -d pleroma_test; do sleep 1; done' || { echo "PostgreSQL did not become ready" >&2; exit 1; }
|
|
||||||
- timeout 60 sh -c 'until pg_isready -h paradedb -U postgres -d paradedb; do sleep 1; done' || { echo "ParadeDB did not become ready" >&2; exit 1; }
|
|
||||||
- mix ecto.create
|
|
||||||
- mix ecto.migrate
|
|
||||||
- mix test --include integration test/pleroma/search/parade_db_integration_test.exs
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: docker.io/postgres:13-alpine
|
|
||||||
failure: ignore
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: pleroma_test
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
paradedb:
|
|
||||||
image: docker.io/paradedb/paradedb:0.24.3-pg15@sha256:997d62f6c2605becb7c45878af3f8c8c698f355006b675b3ce212d4eb2d14f2e
|
|
||||||
failure: ignore
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: paradedb
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path:
|
|
||||||
- ".woodpecker/spec-build.yaml"
|
|
||||||
- "mix.exs"
|
|
||||||
- "mix.lock"
|
|
||||||
- "lib/pleroma/web.ex"
|
|
||||||
- "lib/pleroma/web/**/*.ex"
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
evaluate: 'CI_COMMIT_BRANCH == "stable" || CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
concurrency: 1
|
|
||||||
|
|
||||||
variables:
|
|
||||||
artifacts_uploader_image: &artifacts_uploader_image docker.io/woodpeckercommunity/plugin-gitea-package:0.5.1
|
|
||||||
artifacts_uploader_settings: &artifacts_uploader_settings
|
|
||||||
user:
|
|
||||||
from_secret: pleroma-ci-user
|
|
||||||
password:
|
|
||||||
from_secret: pleroma-ci-password
|
|
||||||
owner: 'pleroma'
|
|
||||||
package_name: api-docs-spec
|
|
||||||
file_source: ./spec.json
|
|
||||||
file_name: spec.json
|
|
||||||
update: 'true'
|
|
||||||
trigger_image: &trigger_image docker.io/woodpeckerci/plugin-trigger:1.1.1
|
|
||||||
trigger_settings: &trigger_settings
|
|
||||||
deploy: 'api-docs'
|
|
||||||
last-successful: true
|
|
||||||
token:
|
|
||||||
from_secret: pleroma-ci-woodpecker-token
|
|
||||||
repositories:
|
|
||||||
- pleroma/api-docs@master
|
|
||||||
|
|
||||||
steps:
|
|
||||||
build-spec:
|
|
||||||
image: docker.io/hexpm/elixir:1.17.3-erlang-27.3.4.17-alpine-3.22.5
|
|
||||||
environment:
|
|
||||||
MIX_ENV: prod
|
|
||||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
commands:
|
|
||||||
- apk update --no-cache
|
|
||||||
- apk add git build-base cmake file-dev openssl vips-dev zip
|
|
||||||
- mix local.hex --force
|
|
||||||
- mix local.rebar --force
|
|
||||||
- mix deps.get --only prod
|
|
||||||
- mix pleroma.openapi_spec spec.json
|
|
||||||
- |
|
|
||||||
printf 'BRANCH=stable\nSPEC_VERSION=%s\n' "$${CI_COMMIT_SHA}" > trigger-deploy-stable.params
|
|
||||||
printf 'BRANCH=develop\nSPEC_VERSION=%s\n' "$${CI_COMMIT_SHA}" > trigger-deploy-develop.params
|
|
||||||
|
|
||||||
upload-spec:
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_version: ${CI_COMMIT_SHA}
|
|
||||||
|
|
||||||
upload-spec-stable:
|
|
||||||
when:
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_version: stable
|
|
||||||
|
|
||||||
upload-spec-develop:
|
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
image: *artifacts_uploader_image
|
|
||||||
settings:
|
|
||||||
<<: *artifacts_uploader_settings
|
|
||||||
package_version: develop
|
|
||||||
|
|
||||||
trigger-deploy-stable:
|
|
||||||
when:
|
|
||||||
- event: tag
|
|
||||||
- event: manual
|
|
||||||
branch: stable
|
|
||||||
image: *trigger_image
|
|
||||||
settings:
|
|
||||||
<<: *trigger_settings
|
|
||||||
params:
|
|
||||||
- trigger-deploy-stable.params
|
|
||||||
|
|
||||||
trigger-deploy-develop:
|
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
- event: manual
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
image: *trigger_image
|
|
||||||
settings:
|
|
||||||
<<: *trigger_settings
|
|
||||||
params:
|
|
||||||
- trigger-deploy-develop.params
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
evaluate: 'CI_COMMIT_SOURCE_BRANCH != "weblate"'
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- lint
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
unit-testing-elixir-1.17:
|
|
||||||
image: elixir:1.17-otp-27-alpine
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
environment:
|
|
||||||
MIX_ENV: test
|
|
||||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
DB_HOST: postgres
|
|
||||||
DB_PORT: 5432
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache build-base cmake exiftool ffmpeg vips-dev file-dev git openssl
|
|
||||||
- adduser -D -h /home/testuser testuser
|
|
||||||
- mkdir -p /home/testuser/.mix /home/testuser/.hex
|
|
||||||
- chown -R testuser:testuser . /home/testuser
|
|
||||||
- su testuser -c "HOME=/home/testuser mix local.hex --force"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix local.rebar --force"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix deps.get"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix pleroma.test_runner --preload-modules"
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:13-alpine
|
|
||||||
failure: ignore
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: pleroma_test
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
evaluate: 'CI_COMMIT_SOURCE_BRANCH != "weblate"'
|
|
||||||
- event: push
|
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
path: [ "**/*.ex", "**/*.eex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- lint
|
|
||||||
|
|
||||||
labels:
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
variables:
|
|
||||||
script_file_entrypoint: &script_file_entrypoint
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
unit-testing-elixir-1.19:
|
|
||||||
image: elixir:1.19-otp-28-alpine
|
|
||||||
entrypoint: *script_file_entrypoint
|
|
||||||
environment:
|
|
||||||
MIX_ENV: test
|
|
||||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
DB_HOST: postgres
|
|
||||||
DB_PORT: 5432
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache build-base cmake exiftool ffmpeg vips-dev file-dev git openssl
|
|
||||||
- adduser -D -h /home/testuser testuser
|
|
||||||
- mkdir -p /home/testuser/.mix /home/testuser/.hex
|
|
||||||
- chown -R testuser:testuser . /home/testuser
|
|
||||||
- su testuser -c "HOME=/home/testuser mix local.hex --force"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix local.rebar --force"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix deps.get"
|
|
||||||
- su testuser -c "HOME=/home/testuser mix pleroma.test_runner --preload-modules"
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:13-alpine
|
|
||||||
failure: ignore
|
|
||||||
environment:
|
|
||||||
POSTGRES_DB: pleroma_test
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
170
CHANGELOG.md
170
CHANGELOG.md
|
|
@ -4,176 +4,6 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## 2.11.1
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Update Bandit to version 1.14.0, which fixes HTTP/1.1, HTTP/2 and WebSocket denial-of-service and request smuggling vulnerabilities
|
|
||||||
- Update Hackney to version 4.9.1, which fixes unbounded response body buffering and decompression, CA pinning, redirect credential leaks and other vulnerabilities
|
|
||||||
|
|
||||||
## 2.11.0
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- Update Bandit to address HTTP request handling vulnerabilities.
|
|
||||||
- Update bandit to version 1.12.4 to fix a DoS vulnerability
|
|
||||||
- Update bandit to version 1.12.5 to fix an HTTP/2 DoS vulnerability
|
|
||||||
- Update bandit to version 1.13.1 resolving a stuck process and unvalidated HTTP/1 headers vulnerabilities
|
|
||||||
- Updated CAStore to version 1.0.22 with updated Mozilla certificate bundle after eMudhra Intermediate CA Compromise
|
|
||||||
- Update certifi to version 2.18.0, which removes the distrusted emSign roots
|
|
||||||
- Update plug_crypto to version 2.2.1, so a malformed shout socket token no longer writes the secret key base to the error log
|
|
||||||
- Update Cowboy to address multipart header parsing denial-of-service vulnerabilities.
|
|
||||||
- Update cowboy to version 2.19.0 which fixes a memory exhaustion DoS
|
|
||||||
- Update Cowlib to address HTTP parsing resource exhaustion and injection vulnerabilities.
|
|
||||||
- Update cowlib to version 2.20.0 which fixes HTTP splitting and header smuggling/injection vulnerabilities
|
|
||||||
- Update gun to version 2.7.0 and cowlib to version 2.21.0 resolving a header smuggling vulnerability
|
|
||||||
- Update Decimal and compatible dependencies to address a rounding vulnerability.
|
|
||||||
- Update Decimal to version 3.2.0 resolving an unbounded allocation vulnerability
|
|
||||||
- Replace retired Earmark rendering with the maintained EarmarkParser and an attribute-escaping renderer.
|
|
||||||
- Update gun to version 2.6.0 which fixes an HTTP request/response smuggling vulnerability
|
|
||||||
- Update Hackney and its HTTPoison integration to address SSRF, timeout, and injection vulnerabilities.
|
|
||||||
- Hackney, Finch, Mua and the Swoosh HTTP mail adapters now trust only the CAStore certificate bundle, which rejects the compromised eMudhra intermediate CAs
|
|
||||||
- Ensure Host header is present and matches instance URI
|
|
||||||
- Update mint to version 1.10.0 which fixes multiple DoS vulnerabilities
|
|
||||||
- Update mint to version 1.11.0 resolving multiple vulnerabilities
|
|
||||||
- Update Phoenix LiveView to version 1.2.9 to fix an open redirect vulnerability
|
|
||||||
- Update Phoenix to version 1.8.11 resolving a process-exhaustion DoS vulnerability
|
|
||||||
- Update Phoenix to address long-poll NDJSON request denial-of-service vulnerabilities.
|
|
||||||
- Update Plug to address multipart header parsing denial-of-service vulnerabilities.
|
|
||||||
- Update Plug.Cowboy to address HTTP/2 scheme atom exhaustion denial-of-service vulnerabilities.
|
|
||||||
- Update Postgrex to address notification channel-name SQL injection vulnerabilities.
|
|
||||||
- Update postgrex to version 0.22.4 to fix an SQL injection vulnerability
|
|
||||||
- Remove unused QUIC lockfile entry with vulnerable TLS verification behavior.
|
|
||||||
- Update swoosh to version 1.28.0 which fixes a url injection vulnerability for the Microsoft Graph adapter
|
|
||||||
- Scrubbers: remove links and images whose scheme is hidden with tabs, newlines or leading control characters (for example java<TAB>script:), which browsers still run as javascript:. Custom scrubbers should use Pleroma.HTML.URIAttributes.allow_tag_with_uri_attributes instead of the FastSanitize macro
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Update bundled Pleroma-FE to 2.11.4
|
|
||||||
- Allow disabling Chats feature
|
|
||||||
- Pleroma now requires Elixir 1.17 or newer and Erlang/OTP 27 or newer
|
|
||||||
- Update Debian and Ubuntu installation requirements and OTP dependencies
|
|
||||||
- Update Jason to support Decimal 3 dependency resolution.
|
|
||||||
- Changed how Logger is configured due to changes in Elixir and added deprecation warnings for the old configuration format
|
|
||||||
- Update majic to 1.2.0.
|
|
||||||
- Avoid a duplicate user query during OAuth authentication.
|
|
||||||
- Use the Hex package for oban_plugins_lazarus.
|
|
||||||
- Docs OpenBSD: Increased recommended `datasize` from 1536M to 4096M to avoid Pleroma crashes
|
|
||||||
- OpenRC: Automatically run migrations before starting pleroma
|
|
||||||
- Optimize orphaned OAuth apps cleanup by deleting records in batches instead of one by one.
|
|
||||||
- Switch patched Phoenix 1.7.14 back to upstream with Phoenix 1.8.0+
|
|
||||||
- Add optional migrations for rollback from Rebased
|
|
||||||
- Use upstream Hex releases for the `remote_ip` dependency and expose client IP ranges for remote IP resolution.
|
|
||||||
- Improve user search / autocompletion ordering.
|
|
||||||
- Gun is now the default HTTP client instead of Hackney
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Allow creating accounts without a password in the AdminAPI
|
|
||||||
- Implemented ConfigDB configuration blacklist and accompanying Mix task
|
|
||||||
- Accept more real-world ActivityPub object shapes collected by fedidev.fun
|
|
||||||
- Add Mastodon-compatible grouped notifications API endpoints under `/api/v2/notifications` for newly-created notifications
|
|
||||||
- Docs: Added documentation for installing newer version of Elixir/Erlang than what distro ships
|
|
||||||
- Allow attaching emojis to user lists
|
|
||||||
- Implement basics of Mastodon admin API
|
|
||||||
- Add backend support for Misskey Markdown (MFM) posts
|
|
||||||
- Add mix_audit for dependency vulnerability checks.
|
|
||||||
- Oban: Enabled the Reindexer plugin to reduce oban_jobs index DB bloat
|
|
||||||
- Add ParadeDB (pg_search) as an optional external search backend, indexing status content, content warnings, and attachment descriptions.
|
|
||||||
- Add support for Mastodon-compatible webhooks
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fixed `/api/v1/pleroma/accounts/:id/favourites` ordering and pagination to use the favourite date.
|
|
||||||
- Reject unsupported or ambiguous inbox signatures instead of queueing a doomed failed-signature retry, allowing clients to fall back to legacy HTTP Signatures.
|
|
||||||
- Switch native captcha to the published pleroma_captcha Hex package.
|
|
||||||
- Updated the captcha package to fix compilation failure on BSD-based systems
|
|
||||||
- Dockerfile: update base images to fix problems with SSL handshakes
|
|
||||||
- Docs: Fixed OTP install links in documentation, broke up wall of install commands into smaller chunks, fixed sudo commands execution
|
|
||||||
- Fix notification and timeline queries for users with domain blocks choosing a plan that scans every active user per row; the followed-accounts exception is now an `ARRAY(SELECT ...)` InitPlan that the planner costs once.
|
|
||||||
- Fixed Elixir 1.19 warnings
|
|
||||||
- Support fetching featured collection items from the first collection page
|
|
||||||
- Fix preferred frontend not working due to InstanceStatic plug prematurely returning HTTP 404
|
|
||||||
- Fixed Gun HTTP/1 concurrency, forwarding and authenticated proxy handling, tunnel requests, and streamed connection cleanup. Updated Gun and Cowlib for HTTP client security fixes.
|
|
||||||
- Stop leaking a Hackney connection process, and the response bytes it read, for every unpooled request that ends without a reusable socket
|
|
||||||
- Fix hashtag timeline query for additional tag handling
|
|
||||||
- Fix compatibility with timestamped HTTP Signatures used by GoToSocial
|
|
||||||
- Handle reports with just actor ap id as the object
|
|
||||||
- Fix Swoosh HTTP mail adapters failing with `cacerts: :undefined` on OTP 26+
|
|
||||||
- Echo Mastodon-style `Sec-WebSocket-Protocol` tokens in streaming WebSocket handshakes.
|
|
||||||
- Enforce the max_body HTTP option again, which Hackney 4 silently stopped honouring because it always returns a fully read body
|
|
||||||
- Abort incomplete media proxy responses instead of caching partial bodies.
|
|
||||||
- Updated Pleroma-FE build URL after Forgejo migration
|
|
||||||
- Fix votersCount inflation when same voter picks multiple options
|
|
||||||
- Status: Fill all MastoAPI required values in preview cards
|
|
||||||
- Avoid creating atoms from serialized PublisherWorker parameters.
|
|
||||||
- Reject incoming reports when both the reporter and reported account are remote
|
|
||||||
- Fixed account status and media views exposing activities restricted from unauthenticated users.
|
|
||||||
- Stop leaking a Hackney connection process for every media proxy response that was streamed to the end
|
|
||||||
- Fix RSS feeds to be W3C compliant and render better in RSS readers
|
|
||||||
- Keep followed users visible in streams when their domain is blocked.
|
|
||||||
- Fix intermittent failure to compile syslog package
|
|
||||||
- Fix inconsistent User cache keys and invalidate numeric ID aliases.
|
|
||||||
- Include arm32v7 in multi-arch Docker images
|
|
||||||
- RichMedia: Fix backfill causing old posts to show up on timelines by disabling it in MastoAPI StatusView
|
|
||||||
- Fix Admin-FE installation by downloading builds from the package registry instead of GitLab job artifacts.
|
|
||||||
- Hackney: use HTTP/1.1 only, so closing one media proxy response no longer breaks other downloads from the same host
|
|
||||||
- Hackney: use the configured proxy when its host is an IP address; Hackney 4 ignored such proxies and connected directly
|
|
||||||
|
|
||||||
## 2.10.2
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
- ActivityPub: Fixed failed-signature inbox retry handling and signer identity checks to prevent spoofed remote activities from being processed
|
|
||||||
|
|
||||||
## 2.10.1
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Move avatar_description and header_description fields to the account object
|
|
||||||
- Update Bandit to 1.10.4
|
|
||||||
- No-op code correctness improvements detected by Elixir 1.19 compiler
|
|
||||||
- Downgrade Hackney to 1.20.1
|
|
||||||
- Use a custom redirect handler to ensure MediaProxy redirects are followed with Hackney
|
|
||||||
- Update Hackney, the default HTTP client, to the latest release which supports Happy Eyeballs for improved IPv6 federation
|
|
||||||
- Paginate follow requests
|
|
||||||
- Moved Phoenix LiveDashboard to /pleroma/live_dashboard
|
|
||||||
- Add mute/block expiry to the relationship object
|
|
||||||
- Filter indexable activities before inserting indexing jobs into the queue.
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
- Allow assigning users to reports
|
|
||||||
- Allow fine-grained announce visibilities
|
|
||||||
- Add immutable tag on cache-control header for several endpoints that's serving the same exact things.
|
|
||||||
- Add reasonable defaults for :database_config_whitelist
|
|
||||||
- Support lists `exclusive` param
|
|
||||||
- Add v1/instance/domain_blocks endpoint
|
|
||||||
- Add /api/v2/instance profile fields limits info used by Mastodon
|
|
||||||
- Added Oban Web dashboard located at /pleroma/oban
|
|
||||||
- Add instructions on how to run a release in docker, to make it easier to run on older distros.
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Fix the daily email digest job which was not executing
|
|
||||||
- Encode custom emoji URLs in EmojiReact activity tags.
|
|
||||||
- Gopher: Fix Ranch listener not being stopped properly on Pleroma restart when database configuration is enabled
|
|
||||||
- Fix fetching Hubzilla Actors with alsoKnownAs as string
|
|
||||||
- Fix /phoenix/live_dashboard redirect not working when user added a path segment
|
|
||||||
- Fix 404 error codes for missing static files
|
|
||||||
- Fix OAuth app registration to accept `redirect_uris` as an array of strings (RFC 7591), while keeping backwards compatibility with string input.
|
|
||||||
- Correct old migrations for expiring activities and user access tokens.
|
|
||||||
- Federate `votersCount` correctly
|
|
||||||
- DB prune: Check if user follows hashtag with no objects before deletion
|
|
||||||
- Stop the rate limiter from crashing when run with wrong settings.
|
|
||||||
- Restore embeds route
|
|
||||||
- ReverseProxy: Recursively follow redirects until redirect_limit is reached
|
|
||||||
- Fix compilation with vips-8.18.0 with bumping to vix 0.36.0
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
|
|
||||||
- Docs: Removed outdated, incorrect, unmaintained and inappropriate installation documentation (Arch, NetBSD, NixOS)
|
|
||||||
|
|
||||||
## 2.10
|
## 2.10
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
12
Dockerfile
12
Dockerfile
|
|
@ -1,12 +1,10 @@
|
||||||
# https://hub.docker.com/r/hexpm/elixir/tags
|
# https://hub.docker.com/r/hexpm/elixir/tags
|
||||||
ARG ELIXIR_IMG=hexpm/elixir
|
ARG ELIXIR_IMG=hexpm/elixir
|
||||||
ARG ELIXIR_VER=1.17.3
|
ARG ELIXIR_VER=1.17.3
|
||||||
ARG ERLANG_VER=27.3.4.17
|
ARG ERLANG_VER=26.2.5.6
|
||||||
ARG ALPINE_VER=3.23.5
|
ARG ALPINE_VER=3.17.9
|
||||||
ARG ELIXIR_TAG=${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER}
|
|
||||||
ARG ALPINE_IMG=alpine
|
|
||||||
|
|
||||||
FROM ${ELIXIR_IMG}:${ELIXIR_TAG} AS build
|
FROM ${ELIXIR_IMG}:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} AS build
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|
@ -22,7 +20,7 @@ RUN apk add git gcc g++ musl-dev make cmake file-dev vips-dev &&\
|
||||||
mkdir release &&\
|
mkdir release &&\
|
||||||
mix release --path release
|
mix release --path release
|
||||||
|
|
||||||
FROM ${ALPINE_IMG}:${ALPINE_VER}
|
FROM alpine:${ALPINE_VER}
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VCS_REF
|
ARG VCS_REF
|
||||||
|
|
@ -42,7 +40,7 @@ ARG HOME=/opt/pleroma
|
||||||
ARG DATA=/var/lib/pleroma
|
ARG DATA=/var/lib/pleroma
|
||||||
|
|
||||||
RUN apk update &&\
|
RUN apk update &&\
|
||||||
apk add ffmpeg vips libmagic ncurses postgresql-client &&\
|
apk add exiftool ffmpeg vips libmagic ncurses postgresql-client &&\
|
||||||
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
||||||
mkdir -p ${DATA}/uploads &&\
|
mkdir -p ${DATA}/uploads &&\
|
||||||
mkdir -p ${DATA}/static &&\
|
mkdir -p ${DATA}/static &&\
|
||||||
|
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
# https://hub.docker.com/r/hexpm/elixir/tags
|
|
||||||
ARG ELIXIR_IMG=docker.io/hexpm/elixir
|
|
||||||
ARG ALPINE_IMG=docker.io/alpine
|
|
||||||
ARG ELIXIR_VER=1.18.4
|
|
||||||
ARG ERLANG_VER=27.3.4.11
|
|
||||||
ARG ALPINE_VER=3.23.4
|
|
||||||
|
|
||||||
FROM ${ELIXIR_IMG}:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} AS build
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
ENV MIX_ENV=prod
|
|
||||||
ENV VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS
|
|
||||||
|
|
||||||
RUN apk add git gcc g++ musl-dev make cmake file-dev vips-dev &&\
|
|
||||||
echo "import Config" > config/prod.secret.exs &&\
|
|
||||||
mix local.hex --force &&\
|
|
||||||
mix local.rebar --force &&\
|
|
||||||
mix deps.clean --all &&\
|
|
||||||
mix deps.get --only prod &&\
|
|
||||||
mkdir release &&\
|
|
||||||
mix release --path release
|
|
||||||
|
|
||||||
FROM ${ALPINE_IMG}:${ALPINE_VER}
|
|
||||||
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG VCS_REF
|
|
||||||
|
|
||||||
LABEL maintainer="ops@pleroma.social" \
|
|
||||||
org.opencontainers.image.title="pleroma" \
|
|
||||||
org.opencontainers.image.description="Pleroma FE E2E test image" \
|
|
||||||
org.opencontainers.image.authors="ops@pleroma.social" \
|
|
||||||
org.opencontainers.image.vendor="pleroma.social" \
|
|
||||||
org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
|
|
||||||
org.opencontainers.image.licenses="AGPL-3.0" \
|
|
||||||
org.opencontainers.image.url="https://pleroma.social" \
|
|
||||||
org.opencontainers.image.revision=$VCS_REF \
|
|
||||||
org.opencontainers.image.created=$BUILD_DATE
|
|
||||||
|
|
||||||
ARG HOME=/opt/pleroma
|
|
||||||
ARG DATA=/var/lib/pleroma
|
|
||||||
|
|
||||||
RUN apk update &&\
|
|
||||||
apk add ffmpeg vips libmagic ncurses postgresql-client &&\
|
|
||||||
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
|
||||||
mkdir -p ${DATA}/uploads &&\
|
|
||||||
mkdir -p ${DATA}/static &&\
|
|
||||||
chown -R pleroma ${DATA} &&\
|
|
||||||
mkdir -p /etc/pleroma &&\
|
|
||||||
chown -R pleroma /etc/pleroma
|
|
||||||
|
|
||||||
USER pleroma
|
|
||||||
|
|
||||||
COPY --from=build --chown=pleroma:0 /release ${HOME}
|
|
||||||
|
|
||||||
COPY --chown=pleroma --chmod=640 ./config/docker.exs /etc/pleroma/config.exs
|
|
||||||
COPY ./docker-entrypoint-e2e.sh ${HOME}
|
|
||||||
|
|
||||||
EXPOSE 4000
|
|
||||||
|
|
||||||
ENTRYPOINT ["/opt/pleroma/docker-entrypoint-e2e.sh"]
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<img src="https://git.pleroma.social/pleroma/pleroma/raw/branch/develop/logo-with-name.png" width="300px" />
|
<img src="https://git.pleroma.social/pleroma/pleroma/uploads/8cec84f5a084d887339f57deeb8a293e/pleroma-banner-vector-nopad-notext.svg" width="300px" />
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Reject remote actors whose inbox, shared inbox, followers, following or featured collection, or key id is on another host
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Update ssl_verify_fun to 1.1.9 (EEF-CVE-2026-117666) and phoenix_html to 3.3.5 (EEF-CVE-2026-117645)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Check OAuth token scopes on the ActivityPub C2S endpoints; posting to the outbox with a token now needs the `write` scope
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not crash when rendering attachments with zero width or height
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Update Bandit to version 1.14.1, which fixes an HTTP/2 request body memory amplification
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Rate limit ActivityPub C2S outbox posts and emoji reactions
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Link preview cards skip the fallback link of quote posts (`RE: <url>`), which pointed at the quoted post and showed it twice.
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Fix per-status and per-account rate limits when `Pleroma.Web.ApiSpec.CastAndValidate` `strict` is off (the production default)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Drop all unexpected query params, not just the first one, when `Pleroma.Web.ApiSpec.CastAndValidate` `strict` is off
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not crash at boot or in the AdminAPI config listing when a ConfigDB setting refers to a module that no longer exists
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Show local-only replies in status context to local users who don't follow the replier
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
OAuth token list API now includes property to signify which token is being used to access the API
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Accept incoming emoji reactions whose tag is a single object instead of an array
|
|
||||||
1
changelog.d/emoji-reaction-url-escape.fix
Normal file
1
changelog.d/emoji-reaction-url-escape.fix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Encode custom emoji URLs in EmojiReact activity tags.
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
HTTP: treat an empty proxy_url as no proxy; with Hackney 4 it made every outgoing request fail
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Strip GPS data from WebP and HEIC/AVIF uploads; the Exiftool.StripLocation filter used to skip them; GPS data in XMP (including DJI drone positions) is stripped too
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Exiftool upload filters are replaced by the built-in Exif.StripLocation and Exif.ReadDescription filters; exiftool is no longer required, old filter names still work but are deprecated
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not deliver activities, including public ones and deletes, to instances rejected by SimplePolicy (or not on its accept list), and refuse their signed fetches in authorized fetch mode
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Only accept fetched objects whose id is the URL they were fetched from; for other ids, refetch once from the canonical id on the same host
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Treat filter phrases as literal text; a phrase like "(" no longer breaks timeline and notification queries, and phrases that start or end with punctuation (like "#tag") now match
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Filters with whole_word set to false now also match inside words
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Reject fetched objects whose author has no id instead of crashing
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
gin_fuzzy_search_limit is now only set for search queries (configurable under Pleroma.Search.DatabaseSearch), so other GIN index scans such as recipient lookups and Oban job queries are exact again
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Gun adapter: connect to hosts that only have IPv6 (AAAA) addresses
|
|
||||||
1
changelog.d/hackney-mediaproxy.change
Normal file
1
changelog.d/hackney-mediaproxy.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Use a custom redirect handler to ensure MediaProxy redirects are followed with Hackney
|
||||||
1
changelog.d/hackney.change
Normal file
1
changelog.d/hackney.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Update Hackney, the default HTTP client, to the latest release which supports Happy Eyeballs for improved IPv6 federation
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Back off from hosts that answer 429 or 503 to object fetches and WebFinger, until Retry-After or X-RateLimit-Reset (default 5 minutes, max 1 hour)
|
|
||||||
1
changelog.d/inappropriate-docs.remove
Normal file
1
changelog.d/inappropriate-docs.remove
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Docs: Removed outdated, incorrect, unmaintained and inappropriate installation documentation (Arch, NetBSD, NixOS)
|
||||||
1
changelog.d/instance-domain-blocks.add
Normal file
1
changelog.d/instance-domain-blocks.add
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Add v1/instance/domain_blocks endpoint
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Update jose to version 1.11.13, which fixes JWE, key parsing and signature validation vulnerabilities
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Delete legacy Postgres sequences for activities, chats, and users which were converted to Flake IDs
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Mastodon API: Use the Mastodon date format for marker updated_at
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Add the Mastodon quote entity (`quote` with `state` and `quoted_status`) to statuses, so Mastodon 4.4+ clients show quote posts
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
MediaProxy: Do not proxy data: URLs
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Proxy media given as network-path URLs (//host/path), so remote HTML cannot load images directly
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Media proxy: serve a preview for static=true on non-GIF files instead of redirecting to the main endpoint host
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not notify tagged users who cannot see the post
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Accept a Move when the cached remote target does not list the alias yet, by refetching the target once
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
MRF domain rules now match dots literally, so a rule for `good.example` no longer also matches `goodxexample`, and wildcard rules no longer backtrack on hostile host names
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not crash when creating notifications for posts without content while the user has filters
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Support the Mastodon `profile` OAuth scope, which only gives the public account from verify_credentials
|
|
||||||
1
changelog.d/oauth-registration-redirect_uris.fix
Normal file
1
changelog.d/oauth-registration-redirect_uris.fix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Fix OAuth app registration to accept `redirect_uris` as an array of strings (RFC 7591), while keeping backwards compatibility with string input.
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Require the read:security and write:security scopes to list and revoke OAuth tokens (HTTP Basic auth no longer works for these endpoints)
|
|
||||||
1
changelog.d/oban-web.add
Normal file
1
changelog.d/oban-web.add
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Added Oban Web dashboard located at /pleroma/oban
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
ObjectAgePolicy no longer makes old DMs and followers-only posts public
|
|
||||||
1
changelog.d/paginate-follow-requests.change
Normal file
1
changelog.d/paginate-follow-requests.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Paginate follow requests
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Accept activities delivered to a personal inbox that do not address the inbox owner (fixes Bridgy Fed follows)
|
|
||||||
1
changelog.d/phoenix-livedashboard-move.change
Normal file
1
changelog.d/phoenix-livedashboard-move.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Moved Phoenix LiveDashboard to /pleroma/live_dashboard
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Apply the Note fixups to incoming Questions, so polls with a single non-array tag or attachment are accepted
|
|
||||||
1
changelog.d/reduce-flaky-tests.skip
Normal file
1
changelog.d/reduce-flaky-tests.skip
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Reduce the number of flaky tests by making them sync if they affect the global state, and silence noisy test output.
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not let a refetched object (such as a poll) change its id or author
|
|
||||||
1
changelog.d/release-to-docker.add
Normal file
1
changelog.d/release-to-docker.add
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Add instructions on how to run a release in docker, to make it easier to run on older distros.
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Add a bounded retention mode (`config :pleroma, :retention`): a cron worker walks old activities in id order and evicts remote threads nobody local interacted with, in bounded batches, so the database plateaus instead of growing forever. Adds a `retention_cursors` table. `prune_objects --keep-threads` now also keeps threads that are addressed to a local user, still have a notification for one, contain a post quoted by a local post, or contain a reported post.
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Status search only fetches remote URLs with resolve=true, on the first page, and for anonymous users only if limit_to_local_content allows it
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Deliver to shared inboxes whenever possible, including followers-only posts and DMs, so each server gets one copy
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Reject incoming HTTP signatures that do not sign the date, are older than 2 hours (or more than 1 hour in the future), or do not sign the digest of a request body, so captured requests cannot be replayed. Set `config :pleroma, :activitypub, signature_policy: :log` to only log these
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Read the peer list from the instances table (hosts of remote actors, without our own host) and update instance stats every 5 minutes; the old peers query scanned all remote users every minute
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Rate limit favourites and reblogs per status, not across all statuses
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Added "last active at" field to OAuth token management
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Do not federate the Undo of a block when `outgoing_blocks` is disabled
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Update the known user instead of failing when an actor is fetched from a display URL
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Added information about duplicates and usage when fetching attachments and allow to delete said attachments via `DELETE /api/v1/media/:id`
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Fix deactivated users being counted in followers collections and getting admin emails, because User.Query ignored the is_active key
|
|
||||||
1
changelog.d/vix-0.36.0.fix
Normal file
1
changelog.d/vix-0.36.0.fix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Fix compilation with vips-8.18.0 with bumping to vix 0.36.0
|
||||||
|
|
@ -64,9 +64,9 @@ config :pleroma, Pleroma.Upload,
|
||||||
link_name: false,
|
link_name: false,
|
||||||
proxy_remote: false,
|
proxy_remote: false,
|
||||||
filename_display_max_length: 30,
|
filename_display_max_length: 30,
|
||||||
default_description: nil,
|
default_description: :filename,
|
||||||
base_url: nil,
|
base_url: nil,
|
||||||
allowed_mime_types: ["image", "audio", "video"]
|
allowed_mime_types: ["image", "audio", "video", "application"]
|
||||||
|
|
||||||
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
|
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
|
||||||
|
|
||||||
|
|
@ -133,17 +133,13 @@ config :pleroma, Pleroma.Web.Endpoint,
|
||||||
]
|
]
|
||||||
|
|
||||||
# Configures Elixir's Logger
|
# Configures Elixir's Logger
|
||||||
# Primary config
|
config :logger, backends: [:console]
|
||||||
config :logger, level: :debug
|
|
||||||
|
|
||||||
# Console config
|
config :logger, :console,
|
||||||
config :logger, :default_handler, level: :debug
|
level: :debug,
|
||||||
|
|
||||||
config :logger, :default_formatter,
|
|
||||||
format: "\n$time $metadata[$level] $message\n",
|
format: "\n$time $metadata[$level] $message\n",
|
||||||
metadata: [:actor, :path, :type, :user]
|
metadata: [:actor, :path, :type, :user]
|
||||||
|
|
||||||
# Syslog config
|
|
||||||
config :logger, :ex_syslogger,
|
config :logger, :ex_syslogger,
|
||||||
level: :debug,
|
level: :debug,
|
||||||
ident: "pleroma",
|
ident: "pleroma",
|
||||||
|
|
@ -161,11 +157,7 @@ config :mime, :types, %{
|
||||||
"image/apng" => ["apng"]
|
"image/apng" => ["apng"]
|
||||||
}
|
}
|
||||||
|
|
||||||
config :tesla, adapter: Tesla.Adapter.Gun
|
config :tesla, adapter: Tesla.Adapter.Hackney
|
||||||
|
|
||||||
# Hackney 4 shares one HTTP/2 connection per host, and closing one response
|
|
||||||
# (as the media proxy does) stops it for every other stream on it.
|
|
||||||
config :hackney, default_protocols: [:http1]
|
|
||||||
|
|
||||||
# Configures http settings, upstream proxy etc.
|
# Configures http settings, upstream proxy etc.
|
||||||
config :pleroma, :http,
|
config :pleroma, :http,
|
||||||
|
|
@ -175,18 +167,18 @@ config :pleroma, :http,
|
||||||
adapter: []
|
adapter: []
|
||||||
|
|
||||||
config :pleroma, :instance,
|
config :pleroma, :instance,
|
||||||
name: "Pleroma",
|
name: "Shigusegubu",
|
||||||
email: "example@example.com",
|
email: "pleroma@hjkos.com",
|
||||||
notify_email: "noreply@example.com",
|
notify_email: "pleroma@hjkos.com",
|
||||||
description: "Pleroma: An efficient and flexible fediverse server",
|
description: "SigSegV, a pleroma instance",
|
||||||
short_description: "",
|
short_description: "HJ's semi-personal instance",
|
||||||
background_image: "/images/city.jpg",
|
background_image: "/images/city.jpg",
|
||||||
instance_thumbnail: "/instance/thumbnail.jpeg",
|
instance_thumbnail: "/instance/thumbnail.jpeg",
|
||||||
favicon: "/favicon.png",
|
favicon: "/favicon.png",
|
||||||
limit: 5_000,
|
limit: 5_000,
|
||||||
description_limit: 5_000,
|
description_limit: 5_000,
|
||||||
remote_limit: 100_000,
|
remote_limit: 100_000,
|
||||||
upload_limit: 16_000_000,
|
upload_limit: 200_000_000,
|
||||||
avatar_upload_limit: 2_000_000,
|
avatar_upload_limit: 2_000_000,
|
||||||
background_upload_limit: 4_000_000,
|
background_upload_limit: 4_000_000,
|
||||||
banner_upload_limit: 4_000_000,
|
banner_upload_limit: 4_000_000,
|
||||||
|
|
@ -204,20 +196,17 @@ config :pleroma, :instance,
|
||||||
federation_incoming_replies_max_depth: 100,
|
federation_incoming_replies_max_depth: 100,
|
||||||
allow_relay: true,
|
allow_relay: true,
|
||||||
public: true,
|
public: true,
|
||||||
quarantined_instances: [],
|
quarantined_instances: [{ "pleroma.rareome.ga", "leaks private posts or sumshit i dont rember" }],
|
||||||
rejected_instances: [],
|
rejected_instances: [],
|
||||||
static_dir: "instance/static/",
|
static_dir: "instance/static/",
|
||||||
allowed_post_formats: [
|
allowed_post_formats: [
|
||||||
"text/plain",
|
"text/plain",
|
||||||
"text/html",
|
"text/bbcode"
|
||||||
"text/markdown",
|
|
||||||
"text/bbcode",
|
|
||||||
"text/x.misskeymarkdown"
|
|
||||||
],
|
],
|
||||||
autofollowed_nicknames: [],
|
autofollowed_nicknames: [],
|
||||||
autofollowing_nicknames: [],
|
autofollowing_nicknames: [],
|
||||||
max_pinned_statuses: 1,
|
max_pinned_statuses: 1,
|
||||||
attachment_links: false,
|
attachment_links: true,
|
||||||
max_report_comment_size: 1000,
|
max_report_comment_size: 1000,
|
||||||
report_strip_status: true,
|
report_strip_status: true,
|
||||||
safe_dm_mentions: false,
|
safe_dm_mentions: false,
|
||||||
|
|
@ -310,8 +299,8 @@ config :pleroma, :markup,
|
||||||
|
|
||||||
config :pleroma, :frontend_configurations,
|
config :pleroma, :frontend_configurations,
|
||||||
pleroma_fe: %{
|
pleroma_fe: %{
|
||||||
alwaysShowSubjectInput: true,
|
alwaysShowSubjectInput: false,
|
||||||
background: "/images/city.jpg",
|
background: "/static/sigsegv_s.png",
|
||||||
collapseMessageWithSubject: false,
|
collapseMessageWithSubject: false,
|
||||||
disableChat: false,
|
disableChat: false,
|
||||||
greentext: false,
|
greentext: false,
|
||||||
|
|
@ -325,18 +314,18 @@ config :pleroma, :frontend_configurations,
|
||||||
logo: "/static/logo.svg",
|
logo: "/static/logo.svg",
|
||||||
logoMargin: ".1em",
|
logoMargin: ".1em",
|
||||||
logoMask: true,
|
logoMask: true,
|
||||||
minimalScopesMode: false,
|
minimalScopesMode: true,
|
||||||
noAttachmentLinks: false,
|
noAttachmentLinks: false,
|
||||||
nsfwCensorImage: "",
|
nsfwCensorImage: "",
|
||||||
postContentType: "text/plain",
|
postContentType: "text/plain",
|
||||||
redirectRootLogin: "/main/friends",
|
redirectRootLogin: "/main/friends",
|
||||||
redirectRootNoLogin: "/main/all",
|
redirectRootNoLogin: "/main/all",
|
||||||
scopeCopy: true,
|
scopeCopy: false,
|
||||||
sidebarRight: false,
|
sidebarRight: false,
|
||||||
showFeaturesPanel: true,
|
showFeaturesPanel: true,
|
||||||
showInstanceSpecificPanel: false,
|
showInstanceSpecificPanel: true,
|
||||||
subjectLineBehavior: "email",
|
subjectLineBehavior: "noop",
|
||||||
theme: "pleroma-dark",
|
theme: "sigsegv2",
|
||||||
webPushNotifications: false
|
webPushNotifications: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -373,9 +362,6 @@ config :pleroma, :activitypub,
|
||||||
note_replies_output_limit: 5,
|
note_replies_output_limit: 5,
|
||||||
sign_object_fetches: true,
|
sign_object_fetches: true,
|
||||||
authorized_fetch_mode: false,
|
authorized_fetch_mode: false,
|
||||||
signature_policy: :enforce,
|
|
||||||
signature_max_age: 7200,
|
|
||||||
signature_max_clock_skew: 3600,
|
|
||||||
client_api_enabled: false,
|
client_api_enabled: false,
|
||||||
anonymize_reporter: false,
|
anonymize_reporter: false,
|
||||||
anonymize_reporter_local_nickname: ""
|
anonymize_reporter_local_nickname: ""
|
||||||
|
|
@ -398,8 +384,23 @@ config :pleroma, :mrf_hellthread,
|
||||||
|
|
||||||
config :pleroma, :mrf_simple,
|
config :pleroma, :mrf_simple,
|
||||||
media_removal: [],
|
media_removal: [],
|
||||||
media_nsfw: [],
|
media_nsfw: [
|
||||||
federated_timeline_removal: [],
|
{ "preteengirls.biz", "pron or even cp" },
|
||||||
|
{ "melalandia.tk", "i don't rember" },
|
||||||
|
{ "pl.smuglo.li", "instance is dead but i still remember, rip smuglo" },
|
||||||
|
{ "baraag.net", "pron" },
|
||||||
|
{ "humblr.social", "3dpd pron" },
|
||||||
|
{ "pawoo.net", "tasteful pron, mostly." },
|
||||||
|
{ "sinblr.com", "3dpd pron" }
|
||||||
|
],
|
||||||
|
federated_timeline_removal: [
|
||||||
|
{ "preteengirls.biz", "pron or even cp" },
|
||||||
|
{ "melalandia.tk", "i don't rember" },
|
||||||
|
{ "baraag.net", "pron" },
|
||||||
|
{ "humblr.social", "3dpd pron" },
|
||||||
|
{ "pawoo.net", "tasteful pron, mostly." },
|
||||||
|
{ "sinblr.com", "3dpd pron" }
|
||||||
|
],
|
||||||
report_removal: [],
|
report_removal: [],
|
||||||
reject: [],
|
reject: [],
|
||||||
followers_only: [],
|
followers_only: [],
|
||||||
|
|
@ -510,7 +511,7 @@ config :pleroma, :media_preview_proxy,
|
||||||
min_content_length: 100 * 1024
|
min_content_length: 100 * 1024
|
||||||
|
|
||||||
config :pleroma, :shout,
|
config :pleroma, :shout,
|
||||||
enabled: true,
|
enabled: false,
|
||||||
limit: 5_000
|
limit: 5_000
|
||||||
|
|
||||||
config :phoenix, :format_encoders, json: Jason, "activity+json": Jason
|
config :phoenix, :format_encoders, json: Jason, "activity+json": Jason
|
||||||
|
|
@ -614,16 +615,11 @@ config :pleroma, Oban,
|
||||||
search_indexing: [limit: 10, paused: true],
|
search_indexing: [limit: 10, paused: true],
|
||||||
slow: 5
|
slow: 5
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [Oban.Plugins.Lazarus, {Oban.Plugins.Pruner, max_age: 900}],
|
||||||
Oban.Plugins.Lazarus,
|
|
||||||
{Oban.Plugins.Pruner, max_age: 900},
|
|
||||||
{Oban.Plugins.Reindexer, schedule: "@weekly"}
|
|
||||||
],
|
|
||||||
crontab: [
|
crontab: [
|
||||||
{"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
|
{"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
|
||||||
{"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker},
|
{"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker},
|
||||||
{"*/10 * * * *", Pleroma.Workers.Cron.AppCleanupWorker},
|
{"*/10 * * * *", Pleroma.Workers.Cron.AppCleanupWorker}
|
||||||
{"0 * * * *", Pleroma.Workers.Cron.RetentionWorker}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
config :pleroma, Pleroma.Formatter,
|
config :pleroma, Pleroma.Formatter,
|
||||||
|
|
@ -754,7 +750,6 @@ config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifeti
|
||||||
config :pleroma, Pleroma.Web.Plugs.RemoteIp,
|
config :pleroma, Pleroma.Web.Plugs.RemoteIp,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
headers: ["x-forwarded-for"],
|
headers: ["x-forwarded-for"],
|
||||||
clients: [],
|
|
||||||
proxies: [],
|
proxies: [],
|
||||||
reserved: [
|
reserved: [
|
||||||
"127.0.0.0/8",
|
"127.0.0.0/8",
|
||||||
|
|
@ -793,7 +788,7 @@ config :pleroma, :frontends,
|
||||||
"name" => "pleroma-fe",
|
"name" => "pleroma-fe",
|
||||||
"git" => "https://git.pleroma.social/pleroma/pleroma-fe",
|
"git" => "https://git.pleroma.social/pleroma/pleroma-fe",
|
||||||
"build_url" =>
|
"build_url" =>
|
||||||
"https://git.pleroma.social/api/packages/pleroma/generic/pleroma-fe-builds/${ref}/latest.zip",
|
"https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
|
||||||
"ref" => "develop"
|
"ref" => "develop"
|
||||||
},
|
},
|
||||||
"fedi-fe" => %{
|
"fedi-fe" => %{
|
||||||
|
|
@ -810,7 +805,7 @@ config :pleroma, :frontends,
|
||||||
"name" => "admin-fe",
|
"name" => "admin-fe",
|
||||||
"git" => "https://git.pleroma.social/pleroma/admin-fe",
|
"git" => "https://git.pleroma.social/pleroma/admin-fe",
|
||||||
"build_url" =>
|
"build_url" =>
|
||||||
"https://git.pleroma.social/api/packages/pleroma/generic/admin-fe-builds/${ref}/latest.zip",
|
"https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
|
||||||
"ref" => "develop"
|
"ref" => "develop"
|
||||||
},
|
},
|
||||||
"soapbox" => %{
|
"soapbox" => %{
|
||||||
|
|
@ -844,10 +839,10 @@ config :pleroma, :web_cache_ttl,
|
||||||
|
|
||||||
config :pleroma, :modules, runtime_dir: "instance/modules"
|
config :pleroma, :modules, runtime_dir: "instance/modules"
|
||||||
|
|
||||||
config :pleroma, configurable_from_database: false
|
config :pleroma, configurable_from_database: true
|
||||||
|
|
||||||
config :pleroma, Pleroma.Repo,
|
config :pleroma, Pleroma.Repo,
|
||||||
parameters: [jit: "off"],
|
parameters: [gin_fuzzy_search_limit: "500", jit: "off"],
|
||||||
prepare: :unnamed
|
prepare: :unnamed
|
||||||
|
|
||||||
config :pleroma, :connections_pool,
|
config :pleroma, :connections_pool,
|
||||||
|
|
@ -917,9 +912,13 @@ config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
|
||||||
|
|
||||||
config :pleroma, :mrf,
|
config :pleroma, :mrf,
|
||||||
policies: [
|
policies: [
|
||||||
Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
|
Pleroma.Web.ActivityPub.MRF.SimplePolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.HellthreadPolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy,
|
||||||
Pleroma.Web.ActivityPub.MRF.TagPolicy,
|
Pleroma.Web.ActivityPub.MRF.TagPolicy,
|
||||||
Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
|
Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy,
|
||||||
|
Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy
|
||||||
],
|
],
|
||||||
transparency: true,
|
transparency: true,
|
||||||
transparency_exclusions: []
|
transparency_exclusions: []
|
||||||
|
|
@ -932,12 +931,6 @@ config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
|
||||||
|
|
||||||
config :pleroma, :instances_favicons, enabled: false
|
config :pleroma, :instances_favicons, enabled: false
|
||||||
|
|
||||||
config :pleroma, :retention,
|
|
||||||
enabled: false,
|
|
||||||
max_objects: nil,
|
|
||||||
batch_size: 50_000,
|
|
||||||
keep_non_public: false
|
|
||||||
|
|
||||||
config :floki, :html_parser, Floki.HTMLParser.FastHtml
|
config :floki, :html_parser, Floki.HTMLParser.FastHtml
|
||||||
|
|
||||||
config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
|
config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
|
||||||
|
|
@ -950,30 +943,18 @@ config :pleroma, Pleroma.User.Backup,
|
||||||
timeout: :timer.minutes(30)
|
timeout: :timer.minutes(30)
|
||||||
|
|
||||||
config :pleroma, ConcurrentLimiter, [
|
config :pleroma, ConcurrentLimiter, [
|
||||||
{Pleroma.Search, [max_running: 30, max_waiting: 50]},
|
{Pleroma.Search, [max_running: 30, max_waiting: 50]}
|
||||||
{Pleroma.Webhook.Notify, [max_running: 5, max_waiting: 200]}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
|
config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search.DatabaseSearch, gin_fuzzy_search_limit: 500
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search.Meilisearch,
|
config :pleroma, Pleroma.Search.Meilisearch,
|
||||||
url: "http://127.0.0.1:7700/",
|
url: "http://127.0.0.1:7700/",
|
||||||
private_key: nil,
|
private_key: nil,
|
||||||
initial_indexing_chunk_size: 100_000
|
initial_indexing_chunk_size: 100_000
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search.ParadeDB,
|
|
||||||
url: nil,
|
|
||||||
table: "pleroma_search_documents",
|
|
||||||
fuzzy_distance: 0
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Search.ParadeDB.Repo,
|
|
||||||
pool_size: 2,
|
|
||||||
prepare: :unnamed
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Application,
|
config :pleroma, Pleroma.Application,
|
||||||
background_migrators: true,
|
background_migrators: true,
|
||||||
internal_fetch: true,
|
internal_fetch: true,
|
||||||
|
|
@ -996,21 +977,6 @@ config :pleroma, Pleroma.Search.QdrantSearch,
|
||||||
vectors: %{size: 384, distance: "Cosine"}
|
vectors: %{size: 384, distance: "Cosine"}
|
||||||
}
|
}
|
||||||
|
|
||||||
config :pleroma, :database_config_blacklist, [
|
|
||||||
{:pleroma, :logger}
|
|
||||||
]
|
|
||||||
|
|
||||||
config :pleroma, :database_config_whitelist, [
|
|
||||||
{:pleroma},
|
|
||||||
{:cors_plug},
|
|
||||||
{:ex_aws, :s3},
|
|
||||||
{:mime},
|
|
||||||
{:prometheus, Pleroma.Web.Endpoint.MetricsExporter},
|
|
||||||
{:web_push_encryption, :vapid_details}
|
|
||||||
]
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Chat, enabled: true
|
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
import_config "#{Mix.env()}.exs"
|
import_config "#{Mix.env()}.exs"
|
||||||
|
|
|
||||||
|
|
@ -815,8 +815,7 @@ config :pleroma, :config_description, [
|
||||||
"text/plain",
|
"text/plain",
|
||||||
"text/html",
|
"text/html",
|
||||||
"text/markdown",
|
"text/markdown",
|
||||||
"text/bbcode",
|
"text/bbcode"
|
||||||
"text/x.misskeymarkdown"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
|
|
@ -1395,13 +1394,7 @@ config :pleroma, :config_description, [
|
||||||
label: "Post Content Type",
|
label: "Post Content Type",
|
||||||
type: {:dropdown, :atom},
|
type: {:dropdown, :atom},
|
||||||
description: "Default post formatting option",
|
description: "Default post formatting option",
|
||||||
suggestions: [
|
suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
|
||||||
"text/plain",
|
|
||||||
"text/html",
|
|
||||||
"text/markdown",
|
|
||||||
"text/bbcode",
|
|
||||||
"text/x.misskeymarkdown"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
key: :redirectRootNoLogin,
|
key: :redirectRootNoLogin,
|
||||||
|
|
@ -1788,27 +1781,6 @@ config :pleroma, :config_description, [
|
||||||
description:
|
description:
|
||||||
"List of IPs (CIDR format accepted) to exempt from HTTP Signatures requirement (for example to allow debugging, you shouldn't otherwise need this)"
|
"List of IPs (CIDR format accepted) to exempt from HTTP Signatures requirement (for example to allow debugging, you shouldn't otherwise need this)"
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
key: :signature_policy,
|
|
||||||
type: {:dropdown, :atom},
|
|
||||||
description:
|
|
||||||
"What to do with incoming HTTP signatures that do not sign the date (or `(created)`), are outside the allowed time window, or do not sign the digest of a request body. `:enforce` treats them as invalid, `:log` only logs them",
|
|
||||||
suggestions: [:enforce, :log]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :signature_max_age,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"How old, in seconds, the signed date of an incoming HTTP signature can be. Default: 7200 (2 hours)",
|
|
||||||
suggestions: [7200]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :signature_max_clock_skew,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"How far, in seconds, the signed date of an incoming HTTP signature can be in the future. Default: 3600 (1 hour). A `(created)` time in the future is always rejected",
|
|
||||||
suggestions: [3600]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
key: :note_replies_output_limit,
|
key: :note_replies_output_limit,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
|
|
@ -2747,19 +2719,6 @@ config :pleroma, :config_description, [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: Pleroma.Chat,
|
|
||||||
type: :group,
|
|
||||||
description: "Pleroma Chat settings",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :enabled,
|
|
||||||
type: :boolean,
|
|
||||||
description: "Enables the chats API."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
group: :pleroma,
|
group: :pleroma,
|
||||||
key: :http,
|
key: :http,
|
||||||
|
|
@ -2944,7 +2903,7 @@ config :pleroma, :config_description, [
|
||||||
key: Pleroma.Web.Plugs.RemoteIp,
|
key: Pleroma.Web.Plugs.RemoteIp,
|
||||||
type: :group,
|
type: :group,
|
||||||
description: """
|
description: """
|
||||||
`Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://hex.pm/packages/remote_ip) but with runtime configuration.
|
`Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
|
||||||
**If your instance is not behind at least one reverse proxy, you should not enable this plug.**
|
**If your instance is not behind at least one reverse proxy, you should not enable this plug.**
|
||||||
""",
|
""",
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -2960,12 +2919,6 @@ config :pleroma, :config_description, [
|
||||||
A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
|
A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
|
||||||
"""
|
"""
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
key: :clients,
|
|
||||||
type: {:list, :string},
|
|
||||||
description:
|
|
||||||
"A list of client IPs or subnets in CIDR notation. These will not be treated as proxies or reserved ranges. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128."
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
key: :proxies,
|
key: :proxies,
|
||||||
type: {:list, :string},
|
type: {:list, :string},
|
||||||
|
|
@ -3119,16 +3072,9 @@ config :pleroma, :config_description, [
|
||||||
%{
|
%{
|
||||||
key: :max_connections,
|
key: :max_connections,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
description:
|
description: "Maximum number of connections in the pool. Default: 250 connections.",
|
||||||
"Maximum total number of connections in the pool. HTTP/1 origins may use multiple connections within this limit, while HTTP/2 connections are multiplexed. Default: 250 connections.",
|
|
||||||
suggestions: [250]
|
suggestions: [250]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
key: :max_idle_time,
|
|
||||||
type: :integer,
|
|
||||||
description: "Time before an unused connection is closed. Default: 30000ms.",
|
|
||||||
suggestions: [30_000]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
key: :connect_timeout,
|
key: :connect_timeout,
|
||||||
type: :integer,
|
type: :integer,
|
||||||
|
|
@ -3331,42 +3277,6 @@ config :pleroma, :config_description, [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: :retention,
|
|
||||||
type: :group,
|
|
||||||
description:
|
|
||||||
"Bounded retention: continuously evict old remote threads nobody local interacted with." <>
|
|
||||||
" Local posts and threads with local interactions are always kept.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :enabled,
|
|
||||||
type: :boolean,
|
|
||||||
description: "Run the retention worker from the Oban crontab"
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :max_objects,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Optional watermark. When the objects table is estimated to hold more rows than this," <>
|
|
||||||
" the oldest unpinned remote threads quiet for more than a day are evicted, whatever the retention period.",
|
|
||||||
suggestions: [nil, 1_000_000]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :batch_size,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Number of activities the worker walks per run; their threads are checked and evicted." <>
|
|
||||||
" Default: 50000.",
|
|
||||||
suggestions: [50_000]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :keep_non_public,
|
|
||||||
type: :boolean,
|
|
||||||
description: "Also keep threads that contain non-public posts"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
group: :ex_aws,
|
group: :ex_aws,
|
||||||
key: :s3,
|
key: :s3,
|
||||||
|
|
@ -3580,26 +3490,6 @@ config :pleroma, :config_description, [
|
||||||
suggestion: [5]
|
suggestion: [5]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: Pleroma.Webhook.Notify,
|
|
||||||
type: :keyword,
|
|
||||||
description: "Concurrent limits configuration for webhooks.",
|
|
||||||
suggestions: [max_running: 5, max_waiting: 200],
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :max_running,
|
|
||||||
type: :integer,
|
|
||||||
description: "Max running concurrently jobs.",
|
|
||||||
suggestion: [5]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :max_waiting,
|
|
||||||
type: :integer,
|
|
||||||
description: "Max waiting jobs.",
|
|
||||||
suggestion: [200]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -3613,27 +3503,7 @@ config :pleroma, :config_description, [
|
||||||
key: :module,
|
key: :module,
|
||||||
type: :keyword,
|
type: :keyword,
|
||||||
description: "Selected search module.",
|
description: "Selected search module.",
|
||||||
suggestion: [
|
suggestion: [Pleroma.Search.DatabaseSearch, Pleroma.Search.Meilisearch]
|
||||||
Pleroma.Search.DatabaseSearch,
|
|
||||||
Pleroma.Search.Meilisearch,
|
|
||||||
Pleroma.Search.QdrantSearch,
|
|
||||||
Pleroma.Search.ParadeDB
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: Pleroma.Search.DatabaseSearch,
|
|
||||||
type: :group,
|
|
||||||
description: "Built-in database search settings.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :gin_fuzzy_search_limit,
|
|
||||||
type: :integer,
|
|
||||||
description:
|
|
||||||
"Limits how many matches PostgreSQL considers in GIN full-text search queries (see `gin_fuzzy_search_limit` in the PostgreSQL docs). Only set for search queries. Keeps search fast on large databases, but results become incomplete and change between requests. Set to `nil` for exact results, which is fine on small instances. Default: 500.",
|
|
||||||
suggestions: [500, nil]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -3666,34 +3536,6 @@ config :pleroma, :config_description, [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
%{
|
|
||||||
group: :pleroma,
|
|
||||||
key: Pleroma.Search.ParadeDB,
|
|
||||||
type: :group,
|
|
||||||
description: "ParadeDB settings.",
|
|
||||||
children: [
|
|
||||||
%{
|
|
||||||
key: :url,
|
|
||||||
type: :string,
|
|
||||||
description:
|
|
||||||
"ParadeDB database URL (separate Postgres instance). " <>
|
|
||||||
"Can also be set via `PARADEDB_DATABASE_URL`.",
|
|
||||||
suggestion: ["postgres://postgres:postgres@127.0.0.1:5432/paradedb"]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :table,
|
|
||||||
type: :string,
|
|
||||||
description: "Table name used for search documents.",
|
|
||||||
suggestion: ["pleroma_search_documents"]
|
|
||||||
},
|
|
||||||
%{
|
|
||||||
key: :fuzzy_distance,
|
|
||||||
type: :integer,
|
|
||||||
description: "Edit-distance used for fuzzy token matching (0 disables fuzziness, max 2).",
|
|
||||||
suggestion: [0, 1, 2]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
%{
|
%{
|
||||||
group: :pleroma,
|
group: :pleroma,
|
||||||
key: Pleroma.Language.LanguageDetector,
|
key: Pleroma.Language.LanguageDetector,
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Local
|
||||||
# different ports.
|
# different ports.
|
||||||
|
|
||||||
# Do not include timestamps in development logs
|
# Do not include timestamps in development logs
|
||||||
config :logger, :default_formatter, format: "$metadata[$level] $message\n"
|
config :logger, Logger.Backends.Console, format: "$metadata[$level] $message\n"
|
||||||
|
|
||||||
# Set a higher stacktrace during development. Avoid configuring such
|
# Set a higher stacktrace during development. Avoid configuring such
|
||||||
# in production as building large stacktraces may be expensive.
|
# in production as building large stacktraces may be expensive.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ config :pleroma, Pleroma.Web.Endpoint,
|
||||||
config :phoenix, serve_endpoints: true
|
config :phoenix, serve_endpoints: true
|
||||||
|
|
||||||
# Do not print debug messages in production
|
# Do not print debug messages in production
|
||||||
config :logger, :default_handler, level: :info
|
config :logger, Logger.Backends.Console, level: :info
|
||||||
|
config :logger, :console, level: :info
|
||||||
config :logger, :ex_syslogger, level: :info
|
config :logger, :ex_syslogger, level: :info
|
||||||
|
|
||||||
# ## SSL Support
|
# ## SSL Support
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,9 @@ config :pleroma, Pleroma.Captcha,
|
||||||
method: Pleroma.Captcha.Mock
|
method: Pleroma.Captcha.Mock
|
||||||
|
|
||||||
# Print only warnings and errors during test
|
# Print only warnings and errors during test
|
||||||
config :logger, :default_handler, level: :warning
|
config :logger, :console,
|
||||||
|
level: :warning,
|
||||||
config :logger, :default_formatter,
|
format: "\n[$level] $message\n"
|
||||||
format: "\n[$level] $message\n",
|
|
||||||
colors: [enabled: false]
|
|
||||||
|
|
||||||
config :pleroma, :auth, oauth_consumer_strategies: []
|
config :pleroma, :auth, oauth_consumer_strategies: []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
#!/bin/ash
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
SEED_SENTINEL_PATH=/var/lib/pleroma/.e2e_seeded
|
|
||||||
CONFIG_OVERRIDE_PATH=/var/lib/pleroma/config.exs
|
|
||||||
|
|
||||||
echo '-- Waiting for database...'
|
|
||||||
while ! pg_isready -U "${DB_USER:-pleroma}" -d "postgres://${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-pleroma}" -t 1; do
|
|
||||||
sleep 1s
|
|
||||||
done
|
|
||||||
|
|
||||||
echo '-- Writing E2E config overrides...'
|
|
||||||
cat > "$CONFIG_OVERRIDE_PATH" <<EOF
|
|
||||||
import Config
|
|
||||||
|
|
||||||
config :pleroma, Pleroma.Captcha,
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
config :pleroma, :instance,
|
|
||||||
registrations_open: true,
|
|
||||||
account_activation_required: false,
|
|
||||||
account_approval_required: false
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo '-- Running migrations...'
|
|
||||||
/opt/pleroma/bin/pleroma_ctl migrate
|
|
||||||
|
|
||||||
if [ ! -f "$SEED_SENTINEL_PATH" ]; then
|
|
||||||
if [ -n "${E2E_ADMIN_USERNAME:-}" ] && [ -n "${E2E_ADMIN_PASSWORD:-}" ] && [ -n "${E2E_ADMIN_EMAIL:-}" ]; then
|
|
||||||
echo '-- Seeding admin user' "$E2E_ADMIN_USERNAME" '...'
|
|
||||||
if ! PLEROMA_CTL_RPC_DISABLED=true /opt/pleroma/bin/pleroma_ctl user new "$E2E_ADMIN_USERNAME" "$E2E_ADMIN_EMAIL" --admin --password "$E2E_ADMIN_PASSWORD" -y; then
|
|
||||||
echo '-- User already exists or creation failed, ensuring admin + confirmed...'
|
|
||||||
PLEROMA_CTL_RPC_DISABLED=true /opt/pleroma/bin/pleroma_ctl user set "$E2E_ADMIN_USERNAME" --admin --confirmed
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo '-- Skipping admin seeding (missing E2E_ADMIN_* env)'
|
|
||||||
fi
|
|
||||||
|
|
||||||
touch "$SEED_SENTINEL_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo '-- Starting!'
|
|
||||||
/opt/pleroma/bin/pleroma start &
|
|
||||||
PLEROMA_PID=$!
|
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
if kill -0 "$PLEROMA_PID" 2>/dev/null; then
|
|
||||||
kill -TERM "$PLEROMA_PID"
|
|
||||||
wait "$PLEROMA_PID" || true
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
trap cleanup INT TERM
|
|
||||||
|
|
||||||
echo '-- Waiting for API...'
|
|
||||||
api_ok=false
|
|
||||||
for _i in $(seq 1 120); do
|
|
||||||
if wget -qO- http://127.0.0.1:4000/api/v1/instance >/dev/null 2>&1; then
|
|
||||||
api_ok=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 1s
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$api_ok" != true ]; then
|
|
||||||
echo 'Timed out waiting for Pleroma API to become available'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
wait "$PLEROMA_PID"
|
|
||||||
|
|
@ -169,18 +169,4 @@ This forcibly removes any enabled MRF that does not exist and will fix the abili
|
||||||
=== "From Source"
|
=== "From Source"
|
||||||
```sh
|
```sh
|
||||||
mix pleroma.config fix_mrf_policies
|
mix pleroma.config fix_mrf_policies
|
||||||
```
|
```
|
||||||
|
|
||||||
## Remove non-whitelisted configs from the database
|
|
||||||
|
|
||||||
This removes any configuration value that is not explicitly whitelisted by `:pleroma, :database_config_whitelist`. Might be useful after updating the whitelist.
|
|
||||||
|
|
||||||
=== "OTP"
|
|
||||||
```sh
|
|
||||||
./bin/pleroma_ctl config filter_whitelisted
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "From Source"
|
|
||||||
```sh
|
|
||||||
mix pleroma.config filter_whitelisted
|
|
||||||
```
|
|
||||||
|
|
@ -28,9 +28,6 @@ Replaces embedded objects with references to them in the `objects` table. Only n
|
||||||
|
|
||||||
This will prune remote posts older than 90 days (configurable with [`config :pleroma, :instance, remote_post_retention_days`](../../configuration/cheatsheet.md#instance)) from the database. Pruned posts may be refetched in some cases.
|
This will prune remote posts older than 90 days (configurable with [`config :pleroma, :instance, remote_post_retention_days`](../../configuration/cheatsheet.md#instance)) from the database. Pruned posts may be refetched in some cases.
|
||||||
|
|
||||||
!!! tip
|
|
||||||
To keep the database bounded continuously instead of pruning in one go, see [`:retention`](../../configuration/cheatsheet.md#retention). It uses the same rules as `--keep-threads` but runs in small batches from a cron worker.
|
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
The disk space will only be reclaimed after a proper vacuum. By default Postgresql does this for you on a regular basis, but if your instance has been running for a long time and there are many rows deleted, it may be advantageous to use `VACUUM FULL` (e.g. by using the `--vacuum` option).
|
The disk space will only be reclaimed after a proper vacuum. By default Postgresql does this for you on a regular basis, but if your instance has been running for a long time and there are many rows deleted, it may be advantageous to use `VACUUM FULL` (e.g. by using the `--vacuum` option).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,22 +76,6 @@ The resulting frontend will always be installed into a folder of this template:
|
||||||
|
|
||||||
Careful: This folder will be completely replaced on installation.
|
Careful: This folder will be completely replaced on installation.
|
||||||
|
|
||||||
## Installing Admin-FE
|
|
||||||
|
|
||||||
=== "OTP"
|
|
||||||
|
|
||||||
```sh
|
|
||||||
./bin/pleroma_ctl frontend install admin-fe --ref stable
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "From Source"
|
|
||||||
|
|
||||||
```sh
|
|
||||||
mix pleroma.frontend install admin-fe --ref stable
|
|
||||||
```
|
|
||||||
|
|
||||||
Builds come from the package registry: `https://git.pleroma.social/api/packages/pleroma/generic/admin-fe-builds/${ref}/latest.zip`. `stable` and `develop` are published; `stable` is the better choice for production. A release tag works as `--ref` once a build for it is published.
|
|
||||||
|
|
||||||
## Example installation for an unknown frontend
|
## Example installation for an unknown frontend
|
||||||
|
|
||||||
The installation process is the same, but you will have to give all the needed options on the command line. For example:
|
The installation process is the same, but you will have to give all the needed options on the command line. For example:
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ If any of the options are left unspecified, you will be prompted interactively.
|
||||||
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
|
||||||
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
|
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
|
||||||
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
|
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
|
||||||
- `--strip-uploads-location <Y|N>` - strip sensitive location data from uploaded images
|
- `--strip-uploads-location <Y|N>` - use ExifTool to strip uploads of sensitive location data
|
||||||
- `--read-uploads-description <Y|N>` - read image descriptions from upload metadata
|
- `--read-uploads-description <Y|N>` - use ExifTool to read image descriptions from uploads
|
||||||
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
|
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
|
||||||
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
|
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
|
||||||
- `--skip-release-env` - skip generation the release environment file
|
- `--skip-release-env` - skip generation the release environment file
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ Due to aforementioned bug, preferred way of installing frontends in AdminFE is b
|
||||||

|

|
||||||
and filling in the fields. Unfortunately AdminFE does not provide the raw data necessary for you to fill those fields, so your best bet is to see what backend returns in browser's devtools or refer to the [source code](https://git.pleroma.social/pleroma/pleroma/-/blob/develop/config/config.exs?ref_type=heads#L742-791). For the most part, only **Name**, **Ref** (i.e. version) and **Build URL** fields are required, although some frontends might also require **Build Directory** to work.
|
and filling in the fields. Unfortunately AdminFE does not provide the raw data necessary for you to fill those fields, so your best bet is to see what backend returns in browser's devtools or refer to the [source code](https://git.pleroma.social/pleroma/pleroma/-/blob/develop/config/config.exs?ref_type=heads#L742-791). For the most part, only **Name**, **Ref** (i.e. version) and **Build URL** fields are required, although some frontends might also require **Build Directory** to work.
|
||||||
|
|
||||||
Pleroma-FE and Admin-FE builds come from the package registry, not from GitLab job artifacts. For Admin-FE, set **Name** to `admin-fe`, **Ref** to `stable` (or `develop`) and **Build URL** to `https://git.pleroma.social/api/packages/pleroma/generic/admin-fe-builds/${ref}/latest.zip`. Only refs with a published build can be installed: `stable`, `develop`, and release tags once they are published.
|
For pleroma-fe you can use either `master` or `develop` refs, or potentially any ref in GitLab that has artifacts for `build` job, but that's outside scope of this document.
|
||||||
|
|
||||||
### Selecting default frontend
|
### Selecting default frontend
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -177,8 +177,8 @@ To add configuration to your config file, you can copy it from the base config.
|
||||||
* `media_removal`: List of instances to strip media attachments from and the reason for doing so.
|
* `media_removal`: List of instances to strip media attachments from and the reason for doing so.
|
||||||
* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so.
|
* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so.
|
||||||
* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so.
|
* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so.
|
||||||
* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Activities are also not delivered to these instances, and signed fetches from them are refused in `authorized_fetch_mode`.
|
* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so.
|
||||||
* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so. If set, activities are also only delivered to these instances, and signed fetches from others are refused in `authorized_fetch_mode`.
|
* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so.
|
||||||
* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so.
|
* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so.
|
||||||
* `report_removal`: List of instances to reject reports from and the reason for doing so.
|
* `report_removal`: List of instances to reject reports from and the reason for doing so.
|
||||||
* `avatar_removal`: List of instances to strip avatars from and the reason for doing so.
|
* `avatar_removal`: List of instances to strip avatars from and the reason for doing so.
|
||||||
|
|
@ -286,9 +286,6 @@ Notes:
|
||||||
* `sign_object_fetches`: Sign object fetches with HTTP signatures
|
* `sign_object_fetches`: Sign object fetches with HTTP signatures
|
||||||
* `authorized_fetch_mode`: Require HTTP signatures for AP fetches
|
* `authorized_fetch_mode`: Require HTTP signatures for AP fetches
|
||||||
* `authorized_fetch_mode_exceptions`: List of IPs (CIDR format accepted) to exempt from HTTP Signatures requirement (for example to allow debugging, you shouldn't otherwise need this)
|
* `authorized_fetch_mode_exceptions`: List of IPs (CIDR format accepted) to exempt from HTTP Signatures requirement (for example to allow debugging, you shouldn't otherwise need this)
|
||||||
* `signature_policy`: What to do with incoming HTTP signatures that do not sign the `date` header (or `(created)`), whose signed date is outside the window below, or that do not sign the `digest` header of a request with a body (or whose body Pleroma did not hash). `:enforce` (default) treats them as invalid, `:log` only logs a warning.
|
|
||||||
* `signature_max_age`: How old, in seconds, the signed date of an incoming HTTP signature can be. Default: `7200` (2 hours).
|
|
||||||
* `signature_max_clock_skew`: How far, in seconds, the signed `date` of an incoming HTTP signature can be in the future. Default: `3600` (1 hour). A `(created)` time in the future is always rejected.
|
|
||||||
|
|
||||||
## Pleroma.User
|
## Pleroma.User
|
||||||
|
|
||||||
|
|
@ -544,15 +541,6 @@ Available caches:
|
||||||
|
|
||||||
## HTTP client
|
## HTTP client
|
||||||
|
|
||||||
Pleroma uses [Gun](https://github.com/ninenines/gun) for outgoing HTTP requests. To use Hackney instead:
|
|
||||||
|
|
||||||
```elixir
|
|
||||||
config :tesla, adapter: Tesla.Adapter.Hackney
|
|
||||||
```
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
With Hackney, size limits for fetched responses (for example for link previews) are checked only after Hackney has read the whole response. They limit what Pleroma keeps, not how much it downloads or holds in memory. Gun stops reading at the limit.
|
|
||||||
|
|
||||||
### :http
|
### :http
|
||||||
|
|
||||||
* `proxy_url`: an upstream proxy to fetch posts and/or media with, (default: `nil`)
|
* `proxy_url`: an upstream proxy to fetch posts and/or media with, (default: `nil`)
|
||||||
|
|
@ -562,8 +550,6 @@ config :tesla, adapter: Tesla.Adapter.Hackney
|
||||||
|
|
||||||
### :hackney_pools
|
### :hackney_pools
|
||||||
|
|
||||||
*For `hackney` adapter*
|
|
||||||
|
|
||||||
Advanced. Tweaks Hackney (http client) connections pools.
|
Advanced. Tweaks Hackney (http client) connections pools.
|
||||||
|
|
||||||
There's three pools used:
|
There's three pools used:
|
||||||
|
|
@ -587,8 +573,7 @@ Settings for HTTP connection pool.
|
||||||
|
|
||||||
* `:connection_acquisition_wait` - Timeout to acquire a connection from pool.The total max time is this value multiplied by the number of retries.
|
* `:connection_acquisition_wait` - Timeout to acquire a connection from pool.The total max time is this value multiplied by the number of retries.
|
||||||
* `connection_acquisition_retries` - Number of attempts to acquire the connection from the pool if it is overloaded. Each attempt is timed `:connection_acquisition_wait` apart.
|
* `connection_acquisition_retries` - Number of attempts to acquire the connection from the pool if it is overloaded. Each attempt is timed `:connection_acquisition_wait` apart.
|
||||||
* `:max_connections` - Maximum total number of connections in the pool. HTTP/1 origins may use multiple connections within this limit, while HTTP/2 connections are multiplexed.
|
* `:max_connections` - Maximum number of connections in the pool.
|
||||||
* `:max_idle_time` - Time before an unused connection is closed.
|
|
||||||
* `:connect_timeout` - Timeout to connect to the host.
|
* `:connect_timeout` - Timeout to connect to the host.
|
||||||
* `:reclaim_multiplier` - Multiplied by `:max_connections` this will be the maximum number of idle connections that will be reclaimed in case the pool is overloaded.
|
* `:reclaim_multiplier` - Multiplied by `:max_connections` this will be the maximum number of idle connections that will be reclaimed in case the pool is overloaded.
|
||||||
|
|
||||||
|
|
@ -705,19 +690,15 @@ This filter replaces the filename (not the path) of an upload. For complete obfu
|
||||||
|
|
||||||
No specific configuration.
|
No specific configuration.
|
||||||
|
|
||||||
#### Pleroma.Upload.Filter.Exif.StripLocation
|
#### Pleroma.Upload.Filter.Exiftool.StripLocation
|
||||||
|
|
||||||
This filter strips GPS and location metadata from JPEG, WebP, HEIC, AVIF and TIFF images, leaving color profiles and attributes intact. For PNG images it removes all text and EXIF metadata chunks. Images are not re-encoded, and other formats are left unchanged.
|
This filter only strips the GPS and location metadata with Exiftool leaving color profiles and attributes intact.
|
||||||
|
|
||||||
It replaces the deprecated `Pleroma.Upload.Filter.Exiftool.StripLocation`, which no longer needs exiftool.
|
|
||||||
|
|
||||||
No specific configuration.
|
No specific configuration.
|
||||||
|
|
||||||
#### Pleroma.Upload.Filter.Exif.ReadDescription
|
#### Pleroma.Upload.Filter.Exiftool.ReadDescription
|
||||||
|
|
||||||
This filter reads the ImageDescription and iptc:Caption-Abstract fields so clients can prefill the media description field.
|
This filter reads the ImageDescription and iptc:Caption-Abstract fields with Exiftool so clients can prefill the media description field.
|
||||||
|
|
||||||
It replaces the deprecated `Pleroma.Upload.Filter.Exiftool.ReadDescription`, which no longer needs exiftool.
|
|
||||||
|
|
||||||
No specific configuration.
|
No specific configuration.
|
||||||
|
|
||||||
|
|
@ -877,23 +858,21 @@ Web Push Notifications configuration. You can use the mix task `mix web_push.gen
|
||||||
* ``private_key``: VAPID private key
|
* ``private_key``: VAPID private key
|
||||||
|
|
||||||
## :logger
|
## :logger
|
||||||
* Logging to console/stdout is done by default, use `{ExSyslogger, :ex_syslogger}` to log to syslog
|
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
|
||||||
|
|
||||||
An example to enable ONLY ExSyslogger (f/ex in ``prod.secret.exs``) with info and debug suppressed:
|
An example to enable ONLY ExSyslogger (f/ex in ``prod.secret.exs``) with info and debug suppressed:
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, :logger,
|
config :logger,
|
||||||
backends: [{ExSyslogger, :ex_syslogger}]
|
backends: [{ExSyslogger, :ex_syslogger}]
|
||||||
|
|
||||||
config :logger, default_handler: false
|
|
||||||
|
|
||||||
config :logger, :ex_syslogger,
|
config :logger, :ex_syslogger,
|
||||||
level: :warning
|
level: :warning
|
||||||
```
|
```
|
||||||
|
|
||||||
Another example, keeping console output and adding the pid to syslog output:
|
Another example, keeping console output and adding the pid to syslog output:
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, :logger,
|
config :logger,
|
||||||
backends: [{ExSyslogger, :ex_syslogger}]
|
backends: [:console, {ExSyslogger, :ex_syslogger}]
|
||||||
|
|
||||||
config :logger, :ex_syslogger,
|
config :logger, :ex_syslogger,
|
||||||
level: :warning,
|
level: :warning,
|
||||||
|
|
@ -904,22 +883,23 @@ See: [logger’s documentation](https://hexdocs.pm/logger/Logger.html) and [ex_s
|
||||||
|
|
||||||
An example of logging info to local syslog, but debug to console:
|
An example of logging info to local syslog, but debug to console:
|
||||||
```elixir
|
```elixir
|
||||||
config :pleroma, :logger,
|
config :logger,
|
||||||
backends: [{ExSyslogger, :ex_syslogger}]
|
backends: [ {ExSyslogger, :ex_syslogger}, :console ],
|
||||||
|
level: :info
|
||||||
|
|
||||||
config :logger, :ex_syslogger,
|
config :logger, :ex_syslogger,
|
||||||
level: :info,
|
level: :info,
|
||||||
ident: "pleroma",
|
ident: "pleroma",
|
||||||
format: "$metadata[$level] $message"
|
format: "$metadata[$level] $message"
|
||||||
|
|
||||||
config :logger, :default_handler,
|
config :logger, :console,
|
||||||
level: :debug
|
level: :debug,
|
||||||
|
|
||||||
config :logger, :default_formatter,
|
|
||||||
format: "\n$time $metadata[$level] $message\n",
|
format: "\n$time $metadata[$level] $message\n",
|
||||||
metadata: [:request_id]
|
metadata: [:request_id]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Database options
|
## Database options
|
||||||
|
|
||||||
### RUM indexing for full text search
|
### RUM indexing for full text search
|
||||||
|
|
@ -1152,9 +1132,8 @@ Boolean, enables/disables in-database configuration. Read [Transferring the conf
|
||||||
|
|
||||||
List of valid configuration sections which are allowed to be configured from the
|
List of valid configuration sections which are allowed to be configured from the
|
||||||
database. Settings stored in the database before the whitelist is configured are
|
database. Settings stored in the database before the whitelist is configured are
|
||||||
still applied. Consider running the `mix pleroma.config filter_whitelisted` task
|
still applied, so it is suggested to only use the whitelist on instances that
|
||||||
after updating the whitelist. Read [Remove non-whitelisted configs from the database](../administration/CLI_tasks/config.md#remove-non-whitelisted-configs-from-the-database)
|
have not migrated the config to the database.
|
||||||
for more information.
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```elixir
|
```elixir
|
||||||
|
|
@ -1203,20 +1182,6 @@ Control favicons for instances.
|
||||||
|
|
||||||
* `enabled`: Allow/disallow displaying and getting instances favicons
|
* `enabled`: Allow/disallow displaying and getting instances favicons
|
||||||
|
|
||||||
## :retention
|
|
||||||
|
|
||||||
Bounded retention of remote content. Local posts are your data; remote posts are a cache of somebody else's, and this treats them that way. When enabled, a cron worker (`Pleroma.Workers.Cron.RetentionWorker`, hourly by default) evicts a batch of remote threads that nobody local has interacted with and that have been quiet for longer than `remote_post_retention_days` (see [`:instance`](#instance)). The database then plateaus instead of growing without limit.
|
|
||||||
|
|
||||||
A thread is never evicted if it contains a local post, reply, favourite, repeat or reaction, a post bookmarked by a local user, a post addressed to a local user (direct messages and mentions), a post quoted by a local post, a post a local user still has a notification for, or a post that was reported. Relationship activities (follows, blocks) and chat messages are never touched. Evicted posts are refetched on demand when somebody opens them again, as with `prune_objects`.
|
|
||||||
|
|
||||||
* `enabled`: Run the worker. Defaults to `false`.
|
|
||||||
* `max_objects`: Optional watermark. When the `objects` table is estimated to hold more rows than this, the oldest unpinned remote threads that have been quiet for more than a day are evicted, whatever `remote_post_retention_days` says. Defaults to `nil` (age only).
|
|
||||||
* `batch_size`: Number of activities walked per run. Their threads are checked and, if unpinned, evicted. Defaults to `50000`.
|
|
||||||
* `keep_non_public`: Also keep threads that contain a non-public post. Defaults to `false`.
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
The worker walks the `activities` table in id order, `batch_size` activities per run, up to the id that corresponds to the retention deadline, and remembers its position in the `retention_cursors` table. Each activity is visited once, when it becomes old enough, and only the threads it belongs to are checked through the context index. Over the `max_objects` watermark a second walk with its own cursor runs up to one day ago instead. The first run starts from the oldest activity; on an instance that never pruned this backlog takes many runs, so run `prune_objects --keep-threads --prune-orphaned-activities` once for the initial cut. Threads that were kept and later lost their pin (removed bookmarks, cleared notifications of other kinds) are only revisited on a fresh walk: delete the row from `retention_cursors` to restart from the beginning. Space freed by eviction is reused by new rows; it is not handed back to the filesystem unless you `VACUUM FULL`.
|
|
||||||
|
|
||||||
## Pleroma.User.Backup
|
## Pleroma.User.Backup
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,3 @@ The other way to do it, for example, with Tor you would most likely add somethin
|
||||||
```
|
```
|
||||||
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050}
|
||||||
```
|
```
|
||||||
|
|
||||||
The Gun HTTP adapter supports SOCKS5. SOCKS4 proxies require another HTTP adapter.
|
|
||||||
For regular HTTP proxies, Gun forwards plain HTTP requests directly and uses CONNECT tunnels for HTTPS requests.
|
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,6 @@ To use built-in search that has no external dependencies, set the search module
|
||||||
|
|
||||||
While it has no external dependencies, it has problems with performance and relevancy.
|
While it has no external dependencies, it has problems with performance and relevancy.
|
||||||
|
|
||||||
With a GIN index (the default), search queries limit how many matches PostgreSQL considers (`gin_fuzzy_search_limit`, see [PostgreSQL's docs](https://www.postgresql.org/docs/current/gin.html#GIN-TIPS)). This keeps searches for common words fast on large databases, but the results are incomplete and can change between requests. On smaller instances you can turn it off for exact results:
|
|
||||||
|
|
||||||
> config :pleroma, Pleroma.Search.DatabaseSearch, gin_fuzzy_search_limit: nil
|
|
||||||
|
|
||||||
Without a limit, searches for common words can take longer than the database timeout on large databases, and then return nothing.
|
|
||||||
|
|
||||||
Earlier versions of Pleroma set this limit for every database connection, which also made other GIN index scans (for example recipient lookups) incomplete. It is now only set for search queries.
|
|
||||||
|
|
||||||
## QdrantSearch
|
## QdrantSearch
|
||||||
|
|
||||||
This uses the vector search engine [Qdrant](https://qdrant.tech) to search the posts in a vector space. This needs a way to generate embeddings and uses the [OpenAI API](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings). This is implemented by several project besides OpenAI itself, including the python-based fastembed-server found in `supplemental/search/fastembed-api`.
|
This uses the vector search engine [Qdrant](https://qdrant.tech) to search the posts in a vector space. This needs a way to generate embeddings and uses the [OpenAI API](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings). This is implemented by several project besides OpenAI itself, including the python-based fastembed-server found in `supplemental/search/fastembed-api`.
|
||||||
|
|
@ -93,7 +85,7 @@ You will see a "Default Admin API Key", this is the key you actually put into yo
|
||||||
|
|
||||||
### Initial indexing
|
### Initial indexing
|
||||||
|
|
||||||
After setting up the configuration, you'll want to index all of your already existing posts. Only public/unlisted posts are indexed. You'll only
|
After setting up the configuration, you'll want to index all of your already existing posts. Only public posts are indexed. You'll only
|
||||||
have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. This is also a fairly RAM
|
have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. This is also a fairly RAM
|
||||||
consuming process for `meilisearch`, and it will take a lot of RAM when running if you have a lot of posts (seems to be around 5G for ~1.2
|
consuming process for `meilisearch`, and it will take a lot of RAM when running if you have a lot of posts (seems to be around 5G for ~1.2
|
||||||
million posts while idle and up to 7G while indexing initially, but your experience may be different).
|
million posts while idle and up to 7G while indexing initially, but your experience may be different).
|
||||||
|
|
@ -153,155 +145,3 @@ This will clear **all** the posts from the search index. Note, that deleted post
|
||||||
there is no need to actually clear the whole index, unless you want **all** of it gone. That said, the index does not hold any information
|
there is no need to actually clear the whole index, unless you want **all** of it gone. That said, the index does not hold any information
|
||||||
that cannot be re-created from the database, it should also generally be a lot smaller than the size of your database. Still, the size
|
that cannot be re-created from the database, it should also generally be a lot smaller than the size of your database. Still, the size
|
||||||
depends on the amount of text in posts.
|
depends on the amount of text in posts.
|
||||||
|
|
||||||
## ParadeDB
|
|
||||||
|
|
||||||
[ParadeDB](https://www.paradedb.com/) is a Postgres extension that provides BM25 full-text search. In Pleroma, it can be used as an
|
|
||||||
external search backend by pointing Pleroma at a separate Postgres instance with the `pg_search` extension installed.
|
|
||||||
Pleroma's integration suite tests `pg_search` 0.24.3 on PostgreSQL 15.
|
|
||||||
|
|
||||||
Pleroma will maintain a small `pleroma_search_documents` table in that database (via the existing search indexing queue) and run search
|
|
||||||
queries against it.
|
|
||||||
The indexed text includes status content, content warnings, and attachment descriptions.
|
|
||||||
|
|
||||||
### Configuration
|
|
||||||
|
|
||||||
Set the search module to `Pleroma.Search.ParadeDB` and configure the ParadeDB database URL. These settings must be in static/runtime config
|
|
||||||
(or `PARADEDB_DATABASE_URL`) so the dedicated ParadeDB Repo is started with the application. They cannot be migrated to or changed through
|
|
||||||
ConfigDB.
|
|
||||||
|
|
||||||
> config :pleroma, Pleroma.Search, module: Pleroma.Search.ParadeDB
|
|
||||||
>
|
|
||||||
> config :pleroma, Pleroma.Search.ParadeDB,
|
|
||||||
> url: System.get_env("PARADEDB_DATABASE_URL"),
|
|
||||||
> table: "pleroma_search_documents",
|
|
||||||
> fuzzy_distance: 0
|
|
||||||
>
|
|
||||||
> config :pleroma, Pleroma.Search.ParadeDB.Repo,
|
|
||||||
> pool_size: 2,
|
|
||||||
> prepare: :unnamed
|
|
||||||
|
|
||||||
When connecting over an untrusted network, enable certificate verification in the Repo configuration. For example:
|
|
||||||
|
|
||||||
> config :pleroma, Pleroma.Search.ParadeDB.Repo,
|
|
||||||
> ssl: [
|
|
||||||
> verify: :verify_peer,
|
|
||||||
> cacertfile: "/etc/pleroma/paradedb-ca.pem",
|
|
||||||
> server_name_indication: ~c"paradedb.example.com"
|
|
||||||
> ]
|
|
||||||
|
|
||||||
### Initial rollout
|
|
||||||
|
|
||||||
The `pg_search` extension must already be available in the database. Creating the extension normally requires an administrative database
|
|
||||||
role. The Pleroma runtime role requires `CONNECT` on the database, `USAGE` on the table's schema and the `pdb` schema, and `SELECT`, `INSERT`, `UPDATE`,
|
|
||||||
and `DELETE` on the generated table. For example, after creating the table as its owner:
|
|
||||||
|
|
||||||
```sql
|
|
||||||
GRANT CONNECT ON DATABASE paradedb TO pleroma_search;
|
|
||||||
GRANT USAGE ON SCHEMA public, pdb TO pleroma_search;
|
|
||||||
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE pleroma_search_documents TO pleroma_search;
|
|
||||||
```
|
|
||||||
|
|
||||||
Use this rollout order to prevent jobs from being handled by the previous backend:
|
|
||||||
|
|
||||||
1. Install `pg_search` 0.24.3 on PostgreSQL 15 or another deliberately tested combination.
|
|
||||||
2. Stop Pleroma so no search indexing jobs are running.
|
|
||||||
3. Put the ParadeDB backend in static configuration.
|
|
||||||
4. Create the table and BM25 index in a one-shot offline process using `PARADEDB_DATABASE_URL` with the table owner/setup credential.
|
|
||||||
5. Apply the runtime grants shown above, set the service's `PARADEDB_DATABASE_URL` to the restricted runtime credential, and start Pleroma.
|
|
||||||
6. Start the initial backfill and monitor the `search_indexing` queue.
|
|
||||||
|
|
||||||
Create the table and BM25 index once with:
|
|
||||||
|
|
||||||
=== "OTP"
|
|
||||||
```sh
|
|
||||||
PARADEDB_DATABASE_URL='OWNER_URL' PLEROMA_CTL_RPC_DISABLED=true \
|
|
||||||
./bin/pleroma_ctl search.indexer create_index
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "From Source"
|
|
||||||
```sh
|
|
||||||
PARADEDB_DATABASE_URL='OWNER_URL' mix pleroma.search.indexer create_index
|
|
||||||
```
|
|
||||||
|
|
||||||
The task currently prints an error without returning a failing process status. Verify that it prints `Index created` before continuing.
|
|
||||||
|
|
||||||
### Backfill
|
|
||||||
|
|
||||||
Run an initial indexing pass to enqueue existing posts:
|
|
||||||
|
|
||||||
=== "OTP"
|
|
||||||
```sh
|
|
||||||
./bin/pleroma_ctl search.indexer index
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "From Source"
|
|
||||||
```sh
|
|
||||||
PARADEDB_DATABASE_URL='RUNTIME_URL' mix pleroma.search.indexer index
|
|
||||||
```
|
|
||||||
|
|
||||||
The command enqueues up to 100,000 Create activities by default. It uses keyset pagination, so new activities arriving during the backfill
|
|
||||||
do not shift the remaining pages. The defaults and accepted options are:
|
|
||||||
|
|
||||||
* `--limit`: maximum activities to enqueue in this run; defaults to `100000` and must be positive
|
|
||||||
* `--step`: activities fetched from Pleroma's database per page; defaults to `1000` and must be positive
|
|
||||||
* `--chunk`: jobs inserted into Oban per batch; defaults to `100` and must be positive
|
|
||||||
* `--before`: resume before the checkpoint activity ID printed by an earlier run; the cursor is exclusive
|
|
||||||
|
|
||||||
The checkpoint is the last activity enqueued, not confirmation that its job succeeded. Repeat the command with its last `--before`
|
|
||||||
checkpoint only when it reports that more activities remain. Inspect failed or discarded Oban jobs as well as waiting jobs before declaring
|
|
||||||
the backfill complete.
|
|
||||||
|
|
||||||
The same operation can be run from an attached console while Pleroma is online:
|
|
||||||
|
|
||||||
```elixir
|
|
||||||
Pleroma.Search.Backfill.run(limit: 10_000)
|
|
||||||
```
|
|
||||||
|
|
||||||
The returned `next_cursor` can be supplied as `before` when `exhausted` is `false`. The attached API also accepts `limit: :infinity`, but this
|
|
||||||
can create an unbounded number of Oban rows; bounded runs are safer on large instances. An `on_page` callback may be supplied for progress
|
|
||||||
reporting.
|
|
||||||
|
|
||||||
Note: Like the other external search backends, only public/unlisted Notes are indexed.
|
|
||||||
|
|
||||||
Set `fuzzy_distance` to `1` or `2` to allow typo-tolerant matching (`2` is the maximum ParadeDB supports).
|
|
||||||
|
|
||||||
Indexing runs via the Oban `search_indexing` queue. Its stock configuration starts paused so the search health monitor can control it; verify
|
|
||||||
that the queue is running before backfilling. A manually managed queue can be enabled with `search_indexing: 10` in the Oban `queues`
|
|
||||||
configuration instead of a `paused: true` entry.
|
|
||||||
Monitor that queue until the backfill jobs have drained before evaluating search completeness.
|
|
||||||
|
|
||||||
### Rebuilding
|
|
||||||
|
|
||||||
Stop Pleroma, or otherwise ensure no search indexing jobs are running, before rebuilding. While ParadeDB is still the configured backend,
|
|
||||||
run `drop_index`, then `create_index` with the table owner/setup credential. Reapply runtime grants after recreating the table, restart
|
|
||||||
Pleroma, and begin a new backfill. The DDL tasks print failures without returning a failing process status, so verify the exact `Index
|
|
||||||
dropped` and `Index created` success messages. Dropping the table removes only derived search data; Pleroma activities remain in the primary
|
|
||||||
database.
|
|
||||||
|
|
||||||
### Rolling back
|
|
||||||
|
|
||||||
To retain the ParadeDB table for a later retry, configure `Pleroma.Search.DatabaseSearch` (or the previous external backend) in static config
|
|
||||||
and restart Pleroma.
|
|
||||||
|
|
||||||
Before switching backends, inspect the `search_indexing` queue. Drain or cancel pending backfill jobs, or explicitly accept that they will run
|
|
||||||
against the newly configured backend after restart.
|
|
||||||
|
|
||||||
To remove the table during rollback, first stop Pleroma and run `drop_index` with the table owner/setup credential while ParadeDB is still
|
|
||||||
configured:
|
|
||||||
|
|
||||||
=== "OTP"
|
|
||||||
```sh
|
|
||||||
PARADEDB_DATABASE_URL='OWNER_URL' PLEROMA_CTL_RPC_DISABLED=true \
|
|
||||||
./bin/pleroma_ctl search.indexer drop_index
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "From Source"
|
|
||||||
```sh
|
|
||||||
PARADEDB_DATABASE_URL='OWNER_URL' mix pleroma.search.indexer drop_index
|
|
||||||
```
|
|
||||||
|
|
||||||
Verify that the task prints `Index dropped`. Then change the backend in static config and restart. The ParadeDB environment variable may be
|
|
||||||
removed after removing the ParadeDB stanza or switching to a backend that does not start its Repo. After switching away from ParadeDB, the
|
|
||||||
generic `drop_index` task targets the newly configured backend and will not remove the ParadeDB table; remove it directly with the database
|
|
||||||
owner instead.
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue