Compare commits

..

35 commits

Author SHA1 Message Date
778a69cd 61cb30a737 Actually use niederlausitz logo 2023-08-09 12:12:11 +02:00
778a69cd e6560f4dd0 change page title from Mobilizon to niederlausitz.vonunten.org 2023-08-08 21:14:12 +02:00
778a69cd 320804f982 red color in sitebar 2023-08-08 21:14:12 +02:00
778a69cd 94309ec39b add custom cottbus.vonunten.org logo
`npx prettier --write js/src/components/Logo.vue` did the trick.
2023-08-08 21:14:12 +02:00
778a69cd bb4c85f603 new layout for calendar icon, show weekday
Co-authored-by: unkonkret <unkonkret@systemli.org>
(cherry picked from commit 74457ba861)
2023-08-08 21:10:39 +02:00
778a69cd f514ddd726 use nixos-unstable again, with latest nodejs 2023-08-08 20:52:25 +02:00
778a69cd f6a1b2822d include nodejs in devShell 2023-05-24 17:04:33 +02:00
778a69cd 9e82a9d9af Avoid confusing for users trying to create events for a group, when they don't have enough privileges 2023-05-24 17:04:33 +02:00
jona 053e0010a0 simplified base structure:
now 99 events
2023-04-23 02:20:55 +02:00
jona 187b3a5064 simplified base structure:
startpage shows up to 161 events sorted by date,
"explore" and "view everything" renamed to "filter" --- finally working !!!
2023-04-23 02:20:48 +02:00
778a69cd a129d71b29 revert all changes that lead to configurable homepage sorting, except!
for the changes to elixir code, as it turns out altering the graphql
schema will break existing web clients. We have to remove that change
later in a few months from now (2023-04-23).

Revert "make i18n work for upstream PR https://framagit.org/framasoft/mobilizon/-/merge_requests/1236"

This reverts commit fc2c2db21c9b6e00c2142552f10d7cd2de27fd1d.

Revert "fixup a detail for upstream PR https://framagit.org/framasoft/mobilizon/-/merge_requests/1236"

This reverts commit e34f9d1796d07f228da60ee770f795ce42c3423e.

Revert "Changed interface to consts"

This reverts commit e40558ce7895d29bf831df68520ea0e95fd8667c.

Revert "Extracting sorting modes into its own model"

This reverts commit 839f9fd3f23027bfc00551f22ab0e52c5b63087f.

Revert "Reformatted ex files"

This reverts commit 8e4f698532889323c8b649fe421f413ac3dc3a75.

Revert "Small changes to get it actually working"

This reverts commit 47a6d0e2f27bb42ec09702397bf6094b113b3c91.

Revert "Added option to change sorting on homepage to upcoming"

This reverts commit fa6d875bb47e9e21fd82c3eed7d0a7303e32ddfb.

Revert "increase amount of displayed events on start page"

This reverts commit e84ed5fb7a480fe4ac13a8617542199ad7040154.
2023-04-23 02:19:34 +02:00
summersamara 595a3dca8b add elixir version 1.13.4 to Dockerfile for dev 2023-04-05 00:41:47 +02:00
778a69cd 70c38863a9 use yarn with an older nodejs version in devShell 2023-04-05 00:41:47 +02:00
778a69cd 2f7b1898de use nixpkgs from september 2022 for nix devShell 2023-04-05 00:41:47 +02:00
778a69cd 60fa49a7b1 init nix flake 2023-04-03 13:56:49 +02:00
778a69cd aaee131f1d show events until their end time, unless they have no end time 2023-04-03 13:56:49 +02:00
778a69cd 13306dc1bc increase amount of displayed events on start page 2023-04-03 13:56:49 +02:00
778a69cd 8289eea9c8 fix wrong link in instance follow request email
this is upstreamable
2023-04-03 13:56:49 +02:00
778a69cd f1304b7df8 make i18n work for upstream PR https://framagit.org/framasoft/mobilizon/-/merge_requests/1236 2023-04-03 13:56:49 +02:00
778a69cd ce6ffc4e66 fixup a detail for upstream PR https://framagit.org/framasoft/mobilizon/-/merge_requests/1236 2023-04-03 13:56:49 +02:00
Luca Eichler 19561da63d Changed interface to consts
(cherry picked from commit 238f4f28a31944f98feddedf5fa24714c4328ebc)

upstream PR is https://framagit.org/framasoft/mobilizon/-/merge_requests/1236
2023-04-03 13:56:49 +02:00
Gitea 03b2e1f634 Extracting sorting modes into its own model
(cherry picked from commit da2ae333c9310645f2e8a08532ba032c00ed25c2)

upstream PR is https://framagit.org/framasoft/mobilizon/-/merge_requests/1236
2023-04-03 13:56:49 +02:00
Gitea 8e5093ab41 Reformatted ex files
(cherry picked from commit 8bc216e559975b4111f7f62a9410387578e00811)

upstream PR is https://framagit.org/framasoft/mobilizon/-/merge_requests/1236
2023-04-03 13:56:49 +02:00
Gitea 750072b3b1 Small changes to get it actually working
(cherry picked from commit d16e9f5235652e1121ea5d1d3cde742290ee83f7)

upstream PR is https://framagit.org/framasoft/mobilizon/-/merge_requests/1236
2023-04-03 13:56:49 +02:00
Gitea 3aa10b77b3 Added option to change sorting on homepage to upcoming
(cherry picked from commit f09ede2b820dbce04c036abf582260eafba02795)

upstream PR is https://framagit.org/framasoft/mobilizon/-/merge_requests/1236
2023-04-03 13:56:49 +02:00
778a69cd a2d12990a4 add Mobilizon version to instance config 2023-04-03 13:56:49 +02:00
778a69cd 45f030f227 remove long description on start page for users, that are not logged in 2023-04-03 13:56:49 +02:00
778a69cd f7749a1e2b Revert "default anonymous participation in events to true"
This reverts commit 3a1b7a4660b4fd9488e7d06e677027ae41e0c10c.
2023-04-03 13:56:49 +02:00
778a69cd 3bf5e7a95f default anonymous participation in events to true 2023-04-03 13:56:49 +02:00
778a69cd dbd91b1a21 Use our own categories for event creation 2023-04-03 13:56:49 +02:00
778a69cd d1228ca43f add smoke-free as a metadata option for events
This is upstreamable!
2023-04-03 13:56:49 +02:00
778a69cd 62afefa47e remove pictures for error and 404 site 2023-04-03 13:56:49 +02:00
778a69cd e1c75ceecd removed images in "Meine Veranstaltungen" and "Meine Gruppen" 2023-04-03 13:56:49 +02:00
778a69cd 0f6296d164 remove homepage picture from / 2023-04-03 13:56:49 +02:00
778a69cd 158d36d6ec remove picture and logo in footer 2022-05-18 16:25:01 +02:00
1355 changed files with 83760 additions and 142991 deletions

View file

@ -22,7 +22,7 @@
# In the latter case `**/*.{ex,exs}` will be used.
#
included: ["lib/", "src/", "test/"],
excluded: [~r"/_build/", ~r"/deps/", ~r"/src/"]
excluded: [~r"/_build/", ~r"/deps/", ~r"/js/"]
},
#
# If you create your own checks, you must specify the source files for
@ -33,15 +33,12 @@
# If you want to enforce a style guide and need a more traditional linting
# experience, you can change `strict` to `true` below:
#
strict: true,
strict: false,
#
# If you want to use uncolored output by default, you can change `color`
# to `false` below:
#
color: true,
plugins: [
{CredoCodeClimate, []}
],
#
# You can customize the parameters of any check by adding a second element
# to the tuple.
@ -108,10 +105,9 @@
{Credo.Check.Refactor.MatchInCondition, []},
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
{Credo.Check.Refactor.Nesting,
[
max_nesting: 3
]},
{Credo.Check.Refactor.Nesting, [
max_nesting: 3
]},
{Credo.Check.Refactor.PipeChainStart,
[
excluded_argument_types: [:atom, :binary, :fn, :keyword, :number],
@ -160,7 +156,7 @@
# Removed checks
#
{Credo.Check.Warning.LazyLogging, false},
{Credo.Check.Refactor.MapInto, false}
{Credo.Check.Refactor.MapInto, false},
]
}
]

View file

@ -1,46 +1,44 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/elixir-phoenix-postgres
{
"name": "Elixir, Phoenix, Node.js & PostgresSQL (Community)",
"dockerComposeFile": "docker-compose.yml",
"service": "elixir",
"workspaceFolder": "/workspace",
"name": "Elixir, Phoenix, Node.js & PostgresSQL (Community)",
"dockerComposeFile": "docker-compose.yml",
"service": "elixir",
"workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create.
"settings": {
"sqltools.connections": [
{
"name": "Container database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"database": "postgres",
"username": "postgres",
"password": "postgres"
}
]
},
// Set *default* container specific settings.json values on container create.
"settings": {
"sqltools.connections": [{
"name": "Container database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"database": "postgres",
"username": "postgres",
"password": "postgres"
}]
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"jakebecker.elixir-ls",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg"
],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"jakebecker.elixir-ls",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000, 4001, 5432],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000, 4001, 5432],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "mix deps.get",
// "runArgs": ["--userns=keep-id", "--privileged"],
// "containerUser": "vscode",
// "containerEnv": {
// "HOME": "/home/vscode",
// },
// "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "mix deps.get",
// "runArgs": ["--userns=keep-id", "--privileged"],
// "containerUser": "vscode",
// "containerEnv": {
// "HOME": "/home/vscode",
// },
// "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z",
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}

View file

@ -1,10 +1,6 @@
_build
CONTRIBUTING.md
coverage
demo
deps
doc
docs
docker-compose.yml
Dockerfile
.elixir_ls
@ -19,8 +15,5 @@ Makefile
README.md
SECURITY.md
ssh_match_hostname
package-lock.json
node_modules
playwright-report
test
tests
.js/package-lock.json
js/node_modules

View file

@ -22,6 +22,3 @@ MOBILIZON_SMTP_PORT=25
MOBILIZON_SMTP_USERNAME=noreply@mobilizon.lan
MOBILIZON_SMTP_PASSWORD=password
MOBILIZON_SMTP_SSL=false
# When using docker for development, VITE_HOST must be set to 0.0.0.0
VITE_HOST=localhost

View file

@ -1,5 +1,4 @@
[
import_deps: [:ecto, :ecto_sql, :phoenix],
plugins: [Phoenix.LiveView.HTMLFormatter],
inputs: ["{mix,.formatter}.exs", "{config,lib,test,priv}/**/*.{ex,exs,heex}"]
]

12
.gitignore vendored
View file

@ -46,16 +46,6 @@ release/
.weblate
docker/production/.env
test-junit-report.xml
junit.xml
js/junit.xml
.env
demo/
codeclimate.json
node_modules
stats.html
/coverage
/playwright-report/
.histoire
# Nix out-links
result*

View file

@ -4,14 +4,15 @@ stages:
- install
- check
- build-js
- sentry
- test
- build
- docker
- package
- upload
- deploy
variables:
MIX_ENV: "test"
YARN_CACHE_FOLDER: "js/.yarn"
# DB Variables for Postgres / Postgis
POSTGRES_DB: mobilizon_test
POSTGRES_USER: postgres
@ -30,14 +31,17 @@ variables:
EXPORT_FORMATS: "csv,ods,pdf"
APP_VERSION: "${CI_COMMIT_REF_NAME}"
APP_ASSET: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${ARCH}.tar.gz"
CYPRESS_INSTALL_BINARY: 0
cache:
key: "${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}"
paths:
- ~/.cache/Cypress
- cache/Cypress
- deps/
- _build/
- node_modules
- .npm
- js/node_modules
- js/.yarn
# Installed dependencies are cached across the pipeline
# So there is no need to reinstall them all the time
@ -45,7 +49,7 @@ cache:
install:
stage: install
script:
- npm ci
- yarn --cwd "js" install --frozen-lockfile
- mix deps.get
- mix compile
@ -62,30 +66,27 @@ lint-elixir:
- mix credo diff --from-git-merge-base $TARGET_SHA1 --strict -a || export EXITVALUE=1
- mix sobelow --config || export EXITVALUE=1
- exit $EXITVALUE
artifacts:
reports:
codequality: codeclimate.json
lint-front:
image: node:20
image: node:16
stage: check
before_script:
- export EXITVALUE=0
- npm ci
- yarn --cwd "js" install --frozen-lockfile
script:
- npm run lint || export EXITVALUE=1
- npx prettier -c . || export EXITVALUE=1
- yarn --cwd "js" run lint || export EXITVALUE=1
- yarn --cwd "js" run prettier -c . || export EXITVALUE=1
- exit $EXITVALUE
build-frontend:
stage: build-js
image: node:20
image: node:16
before_script:
- apt update
- apt install -y --no-install-recommends python3 build-essential webp imagemagick gifsicle jpegoptim optipng pngquant
- apt install -y --no-install-recommends python build-essential webp imagemagick gifsicle jpegoptim optipng pngquant
script:
- npm install --frozen-lockfile
- npm run build
- yarn --cwd "js" install --frozen-lockfile
- yarn --cwd "js" run build
artifacts:
expire_in: 5 days
paths:
@ -93,21 +94,6 @@ build-frontend:
needs:
- lint-front
sentry-commit:
stage: sentry
image: getsentry/sentry-cli
script:
- echo "Create a new release $CI_COMMIT_TAG"
- sentry-cli releases new $CI_COMMIT_TAG
- sentry-cli releases set-commits $CI_COMMIT_TAG --auto
- sentry-cli releases files $CI_COMMIT_TAG upload-sourcemaps priv/static/assets/
- sentry-cli releases finalize $CI_COMMIT_TAG
- echo "Finalized release for $CI_COMMIT_TAG"
needs:
- build-frontend
only:
- tags@framasoft/mobilizon
deps:
stage: check
before_script:
@ -115,7 +101,7 @@ deps:
script:
- export EXITVALUE=0
- mix hex.outdated || export EXITVALUE=1
- npm outdated || export EXITVALUE=1
- yarn --cwd "js" outdated || export EXITVALUE=1
- exit $EXITVALUE
allow_failure: true
needs:
@ -124,14 +110,12 @@ deps:
exunit:
stage: test
services:
- name: postgis/postgis:16-3.4
- name: postgis/postgis:14-3.2
alias: postgres
variables:
MIX_ENV: test
before_script:
- mix deps.get
- mix compile
- mix tz_world.update
- mix deps.get && mix tz_world.update
- mix ecto.create
- mix ecto.migrate
script:
@ -143,60 +127,53 @@ exunit:
- test-junit-report.xml
expire_in: 30 days
vitest:
jest:
stage: test
needs:
- lint-front
before_script:
- npm install --frozen-lockfile
- yarn --cwd "js" install --frozen-lockfile
script:
- npm run coverage --reporter=default --reporter=junit --outputFile.junit=./junit.xml
- yarn --cwd "js" run test:unit --no-color --ci --reporters=default --reporters=jest-junit
artifacts:
when: always
paths:
- coverage
- js/coverage
reports:
junit:
- junit.xml
- js/junit.xml
expire_in: 30 days
e2e:
stage: test
services:
- name: postgis/postgis:16-3.4
alias: postgres
variables:
MIX_ENV: "e2e"
before_script:
- mix deps.get
- mix ecto.create
- mix ecto.migrate
- mix run priv/repo/e2e.seed.exs
- npm install && npm run build && npx playwright install
- mix phx.digest
script:
- mix phx.server &
- npx wait-on http://localhost:4000
- npx playwright test --project $BROWSER
parallel:
matrix:
- BROWSER: ["firefox", "chromium"]
artifacts:
expire_in: 2 days
paths:
- playwright-report/
- test-results/
# cypress:
# stage: test
# services:
# - name: postgis/postgis:13.3
# alias: postgres
# variables:
# MIX_ENV=e2e
# script:
# - mix ecto.create
# - mix ecto.migrate
# - mix run priv/repo/e2e.seed.exs
# - mix phx.server &
# - cd js
# - npx wait-on http://localhost:4000
# - if [ -z "$CYPRESS_KEY" ]; then npx cypress run; else npx cypress run --record --parallel --key $CYPRESS_KEY; fi
# artifacts:
# expire_in: 2 day
# paths:
# - js/tests/e2e/screenshots/**/*.png
# - js/tests/e2e/videos/**/*.mp4
pages:
stage: deploy
script:
- mv public public-mbz
- mkdir public
- mix deps.get
- mix docs
- mv doc public/backend
# #- npm run styleguide:build
# #- mv styleguide public/frontend
# #- yarn run --cwd "js" styleguide:build
# #- mv js/styleguide public/frontend
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
artifacts:
@ -205,23 +182,22 @@ pages:
- public
.docker: &docker
stage: build
image: docker:24
stage: docker
image: docker:20.10.12
variables:
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
DOCKER_DRIVER: overlay2
DOCKER_CLI_EXPERIMENTAL: enabled
services:
- docker:24-dind
- docker:20.10.12-dind
cache: {}
before_script:
# Install buildx
- wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
- wget https://github.com/docker/buildx/releases/download/v0.8.1/buildx-v0.8.1.linux-amd64
- mkdir -p ~/.docker/cli-plugins/
- mv buildx-v0.11.2.linux-amd64 ~/.docker/cli-plugins/docker-buildx
- mv buildx-v0.8.1.linux-amd64 ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx
# Create env
- docker context create tls-environment
@ -229,8 +205,6 @@ pages:
# Install qemu/binfmt
- docker pull tonistiigi/binfmt:latest
- docker run --rm --privileged tonistiigi/binfmt:latest --install all
# Install jq
- apk --no-cache add jq
# Login to DockerHub
- mkdir -p ~/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > ~/.docker/config.json
@ -242,72 +216,30 @@ build-docker-main:
rules:
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_TRIGGERED == "true"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
script:
- docker buildx build --platform linux/amd64 -t framasoft/mobilizon:main -f docker/production/Dockerfile .
- docker buildx build --push --platform linux/amd64 -t framasoft/mobilizon:main -f docker/production/Dockerfile .
build-docker-tag:
<<: *docker
rules: &release-tag-rules
rules: &tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: $CI_COMMIT_TAG != null
when: on_success
- if: $CI_COMMIT_TAG
timeout: 3 hours
script:
- >
docker buildx build
--push
--platform linux/${ARCH}
--provenance=false
--build-arg="${ERL_FLAGS}"
-t framasoft/mobilizon:${CI_COMMIT_TAG}-${ARCH}
--platform linux/amd64,linux/arm64,linux/arm
-t framasoft/mobilizon:$CI_COMMIT_TAG
-t framasoft/mobilizon:latest
-f docker/production/Dockerfile .
parallel:
matrix:
- ARCH: ["amd64"]
ERL_FLAGS: ["ERL_FLAGS="]
- ARCH: ["arm64"]
ERL_FLAGS: ["ERL_FLAGS=+JMsingle true"]
# Create manifest and push
docker-manifest-push:
<<: *docker
needs: ["build-docker-tag"]
rules: &release-tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: $CI_COMMIT_TAG != null
when: on_success
script:
- >
docker manifest create framasoft/mobilizon:${CI_COMMIT_TAG}
--amend framasoft/mobilizon:${CI_COMMIT_TAG}-amd64
--amend framasoft/mobilizon:${CI_COMMIT_TAG}-arm64
- docker manifest push --purge framasoft/mobilizon:${CI_COMMIT_TAG}
###
# Simply creating an alias to the tag doesn't work:
# « xxx is a manifest list »
# https://joonas.fi/2021/02/docker-multi-arch-image-tooling-buildx/
###
docker-latest:
<<: *docker
needs: ["docker-manifest-push"]
rules: &release-tag-rules
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /alpha|beta|rc/
when: on_success
script:
- echo docker manifest create framasoft/mobilizon:latest $(docker manifest inspect framasoft/mobilizon:$CI_COMMIT_TAG | jq '.manifests[] | .digest' | xargs -I {} echo framasoft/mobilizon@{})
- docker manifest create framasoft/mobilizon:latest $(docker manifest inspect framasoft/mobilizon:$CI_COMMIT_TAG | jq -r '.manifests[] | .digest' | xargs -I {} echo framasoft/mobilizon@{})
- docker manifest push --purge framasoft/mobilizon:latest
# Packaging app for amd64
package-app:
image: mobilizon/buildpack:1.16.1-erlang-26.2.2-${SYSTEM}
stage: build
image: mobilizon/buildpack:1.13.4-erlang-24.3.3-debian-buster
stage: package
variables: &release-variables
MIX_ENV: "prod"
DEBIAN_FRONTEND: noninteractive
@ -318,7 +250,7 @@ package-app:
- mix local.rebar --force
- mix deps.get --only-prod
- mix compile
- mix phx.digest.clean --all && mix phx.digest
- mix phx.digest.clean --all && \
- mix release --path release/mobilizon
- cd release/mobilizon && ln -s lib/mobilizon-*/priv priv && cd ../../
- du -sh release/
@ -331,21 +263,9 @@ package-app:
expire_in: 2 days
paths:
- ${APP_ASSET}
parallel:
matrix:
- SYSTEM:
[
"debian-bookworm",
"debian-bullseye",
"debian-buster",
"ubuntu-jammy",
"ubuntu-focal",
"fedora-38",
"fedora-39",
]
package-app-dev:
stage: build
stage: package
variables: *release-variables
script: *release-script
except:
@ -356,9 +276,9 @@ package-app-dev:
- ${APP_ASSET}
# Packaging app for multi-arch
package-multi-arch-release:
stage: build
image: docker:24
multi-arch-release:
stage: package
image: docker:20.10.12
variables:
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: tcp://docker:2376
@ -368,13 +288,13 @@ package-multi-arch-release:
APP_ASSET: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${ARCH}.tar.gz"
OS: debian-buster
services:
- docker:24-dind
- docker:20.10.12-dind
cache: {}
before_script:
# Install buildx
- wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
- wget https://github.com/docker/buildx/releases/download/v0.8.1/buildx-v0.8.1.linux-amd64
- mkdir -p ~/.docker/cli-plugins/
- mv buildx-v0.11.2.linux-amd64 ~/.docker/cli-plugins/docker-buildx
- mv buildx-v0.8.1.linux-amd64 ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx
# Create env
- docker context create tls-environment
@ -383,7 +303,7 @@ package-multi-arch-release:
- docker pull tonistiigi/binfmt:latest
- docker run --rm --privileged tonistiigi/binfmt:latest --install all
script:
- docker buildx build --platform linux/${ARCH} --output type=local,dest=releases --build-arg="ERL_FLAGS=+JMsingle true" --build-arg APP_ASSET=${APP_ASSET} -f docker/multiarch/Dockerfile .
- docker buildx build --platform linux/${ARCH} --output type=local,dest=releases --build-arg APP_ASSET=${APP_ASSET} -f docker/multiarch/Dockerfile .
- ls -alh releases/mobilizon/
- du -sh releases/mobilizon/${APP_ASSET}
- mv releases/mobilizon/${APP_ASSET} .
@ -393,27 +313,15 @@ package-multi-arch-release:
expire_in: 2 days
paths:
- ${APP_ASSET}
- erl_crash.dump # if there's a memory issue
parallel:
matrix:
- ARCH: ["arm64"]
## Currently not used as the hexpm base images do not have support for other architectures than amd64
# SYSTEM:
# [
# "debian-bookworm",
# "debian-bullseye",
# "ubuntu-jammy",
# "ubuntu-focal",
# "ubuntu-bionic",
# "alpine-3.17.5",
# "alpine-3.18.4",
# "fedora-38",
# "fedora-39",
# ]
- ARCH: ["arm", "arm64"]
rules:
- if: '$CI_COMMIT_TAG != null || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_TRIGGERED == "true"'
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: $CI_COMMIT_TAG
timeout: 3h
allow_failure: true
# Release
release-upload:
@ -421,9 +329,7 @@ release-upload:
image: framasoft/upload-packages:latest
variables:
APP_ASSET: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${ARCH}.tar.gz"
rules:
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
rules: *tag-rules
script:
- eval `ssh-agent -s`
- ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i)
@ -436,14 +342,11 @@ release-upload:
parallel:
matrix:
- ARCH: ["amd64", "arm", "arm64"]
allow_failure: true
release-create:
stage: deploy
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: '$CI_PROJECT_NAMESPACE != "framasoft"'
when: never
rules: *tag-rules
variables:
APP_ASSET_AMD64: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_amd64.tar.gz"
APP_ASSET_ARM: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_arm.tar.gz"
@ -457,6 +360,6 @@ release-create:
release-cli create --name "$CI_COMMIT_TAG" \
--description "$CHANGELOG" \
--tag-name "$CI_COMMIT_TAG" \
--assets-link "{\"name\":\"${APP_ASSET_AMD64}\",\"url\":\"${ENDPOINT}/${CI_COMMIT_REF_NAME}/${APP_ASSET_AMD64}\"}" \
--assets-link "{\"name\":\"${APP_ASSET_ARM}\",\"url\":\"${ENDPOINT}/${CI_COMMIT_REF_NAME}/${APP_ASSET_ARM}\"}" \
--assets-link "{\"name\":\"${APP_ASSET_ARM64}\",\"url\":\"${ENDPOINT}/${CI_COMMIT_REF_NAME}/${APP_ASSET_ARM64}\"}"
--assets-link "{\"name\":\"${APP_ASSET_AMD64}\",\"url\":\"${ENDPOINT}/${APP_ASSET_AMD64}\"}" \
--assets-link "{\"name\":\"${APP_ASSET_ARM}\",\"url\":\"${ENDPOINT}/${APP_ASSET_ARM}\"}" \
--assets-link "{\"name\":\"${APP_ASSET_ARM64}\",\"url\":\"${ENDPOINT}/${APP_ASSET_ARM64}\"}"

View file

@ -1 +0,0 @@
npm run pre-commit

View file

@ -1,4 +0,0 @@
src/i18n/*.json
coverage/
**/*.md
test/fixtures

View file

@ -1,14 +1,16 @@
26ED12A8E03D044BEDC08749BAA5E357
31CE26BC979C57B9E3CC97B40C290CE5
4E7C044C59E0BCB76AA826789998F624
5BCE3651A03711295046DE48BDFE007E
5C4CED447689F00D9D1ACEB9B895ED29
5D8350E7A2DE5BB1CBCC983AF121F0DA
94ACF7B17C3FF42F64E57DD1DA936BD8
A32E125003F1EDFAD95C487C6A969725
C46C4893B2F702ACADC4CAA5683FE370
CD4CD6571816FCAF1E305066CDA0CD2F
E720CB13C50FF3ADEE7C522531E11217
F3D5851D3FB050939841ED2F14307A27
FD1C9756370A195B74E95CE504C45E9E
02CE4963DFD1B0D6D5C567357CAFFE97
155A1FB53DE39EC8EFCFD7FB94EA823D
2262742E5C8944D5BF6698EC61F5DE50
25BEE162A99754480967216281E9EF33
2A6F71CD6F1246F0B152C2376E2E398A
30552A09D485A6AA73401C1D54F63C21
52900CE4EE3598F6F178A651FB256770
6151F44368FC19F2394274F513C29151
765526195D4C6D770EAF4DC944A8CBF4
B2FF1A12F13B873507C85091688C1D6D
B9AF8A342CD7FF39E10CC10A408C28E1
C042E87389F7BDCFF4E076E95731AE69
C42BFAEF7100F57BED75998B217C857A
D11958E86F1B6D37EF656B63405CA8A4
F16F054F2628609A726B9FF2F089D484

View file

@ -1,3 +1,2 @@
erlang 26.2.2
elixir 1.16.1-otp-26
nodejs 18.19.1
elixir 1.13.4-otp-24
erlang 24.3.3

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,9 @@
FROM elixir:1.15-alpine
FROM elixir:1.13.4-alpine
RUN apk add --no-cache inotify-tools postgresql-client file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3 npm
RUN apk add --no-cache inotify-tools postgresql-client yarn file make gcc libc-dev argon2 imagemagick cmake build-base libwebp-tools bash ncurses git python3
RUN mix local.hex --force && mix local.rebar --force
WORKDIR /app
EXPOSE 4000
EXPOSE 5173

View file

@ -630,7 +630,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Mobilizon
Copyright (C) 2018 - 2024 Framasoft
Copyright (C) 2018 Thomas Citharel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published

View file

@ -4,25 +4,24 @@ init:
setup: stop
@bash docker/message.sh "Compiling everything"
docker compose run --rm api bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate'
docker-compose run --rm api bash -c 'mix deps.get; yarn --cwd "js"; yarn --cwd "js" build:pictures; mix ecto.create; mix ecto.migrate'
migrate:
docker compose run --rm api mix ecto.migrate
docker-compose run --rm api mix ecto.migrate
logs:
docker compose logs -f
docker-compose logs -f
start: stop
@bash docker/message.sh "Starting Mobilizon with Docker"
docker compose up -d api
docker-compose up -d api
@bash docker/message.sh "Docker server started"
stop:
@bash docker/message.sh "Stopping Mobilizon"
docker compose down
docker-compose down
@bash docker/message.sh "Mobilizon is stopped"
test: stop
@bash docker/message.sh "Running tests"
docker compose -f docker-compose.yml -f docker-compose.test.yml run api mix prepare_test
docker compose -f docker-compose.yml -f docker-compose.test.yml run api mix test $(only)
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test $(only)
@bash docker/message.sh "Done running tests"
format:
docker compose run --rm api bash -c "mix format && mix credo --strict"
docker-compose run --rm api bash -c "mix format && mix credo --strict"
@bash docker/message.sh "Code is now ready to commit :)"
target: init

View file

@ -1,5 +1,3 @@
*You can learn about [what we plan to do with this fork](https://framacolibri.org/t/using-mobilizon-for-regional-leftist-subculture-calendar-platforms/18772) in this post in the Mobilizon forum.*
<h1 align="center">
<a href="https://joinmobilizon.org">
<img src="https://lutim.cpy.re/qVYC86G9.png" alt="Mobilizon">
@ -9,7 +7,7 @@
Mobilizon is your federated organization and mobilization platform. Gather people with a convivial, ethical, and emancipating tool.
<p align="center">
<strong>2017 - 2024 Developed with ♥ by <a href="https://framasoft.org">Framasoft</a></strong>
<strong>Developed with ♥ by <a href="https://framasoft.org">Framasoft</a></strong>
</p>
<p align="center">
@ -18,20 +16,6 @@ Mobilizon is your federated organization and mobilization platform. Gather peopl
</a>
</p>
## Notes about this fork
The currently deployed `v4.x` branch can be tested at [https://rotes.potsda.mn/](https://rotes.potsda.mn/).
### Building with Nix
For building this locally, you can use Nix (with Flakes enabled):
```
$ nix build git+ssh://git@git.potsda.mn/potsda.mn/mobilizon.git?ref=main#mobilizon
```
The built package is then located in `result/`.
## Introduction
Mobilizon is a tool designed to create platforms for managing communities and events. Its purpose is to help as many people as possible to free themselves from Facebook groups and events, from Meetup, etc.
@ -57,7 +41,7 @@ There's no lock-in, you can interact with the event without registration.
## Contributing
We appreciate any contribution to Mobilizon. Check [our contributing page](https://docs.joinmobilizon.org/contribute/) for more information.
We appreciate any contribution to Mobilizon. Check our [CONTRIBUTING](CONTRIBUTING.md) file for more information.
## Links
@ -66,7 +50,6 @@ We appreciate any contribution to Mobilizon. Check [our contributing page](https
* 🔢 Pick an instance [https://mobilizon.org](https://mobilizon.org)
* 💻 Source: [https://framagit.org/framasoft/mobilizon](https://framagit.org/framasoft/mobilizon)
* 📜 Documentation [https://docs.joinmobilizon.org](https://docs.joinmobilizon.org)
* A summarized description of structure of sources is done in [`docs/dev.md`](./docs/dev.md)
### Discuss
* 💬 Element/Matrix: [https://matrix.to/#/#Mobilizon:matrix.org](https://matrix.to/#/#Mobilizon:matrix.org)

View file

@ -1,7 +1,7 @@
[Mobilizon](https://joinmobilizon.org) takes security, privacy and user control seriously, and we want to put them front and centre of our project.
This document outlines security procedures and general policies for the Mobilizon project.
The Mobilizon maintainer team and community take all security bugs in Mobilizon seriously. Thank you for improving the security of Mobilizon. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
Framasoft, the Mobilizon maintainer team and community take all security bugs in Mobilizon seriously. Thank you for improving the security of Mobilizon. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
### Goals
@ -15,6 +15,8 @@ The Mobilizon maintainer team and community take all security bugs in Mobilizon
* GDPR compliance.
Framasoft is both a developer of open-source/free/libre self-hosted software, and a service provider with users in the European Union. As a result, we are putting user privacy, data sovereignty, and GDPR compliance into our security plans, including asking both the Framasoft community and outside hackers to review our approaches and implementations.
### Challenges
[Mobilizon](https://joinmobilizon.org) will be challenging to keep secure, as it is:
@ -31,14 +33,14 @@ This means there are more attack surfaces compared to typical proprietary, centr
We are committed to working with security researchers to verify, reproduce, and respond to legitimate reported vulnerabilities. You can help us by following these simple guidelines:
* Alert us about the vulnerability as soon as you become aware of it by emailing the lead maintainer.
* Alert us about the vulnerability as soon as you become aware of it by emailing the lead maintainer at tcit+mobilizon@framasoft.org.
* Provide details needed to reproduce and validate the vulnerability and a Proof of Concept (PoC) as soon as possible
* Act in good faith to avoid privacy violations, destruction of data, and interruption or degradation of services
* Do not access or modify users private data, without explicit permission of the owner. Only interact with your own accounts or test accounts for security research purposes;
* Contact a maintainer of the Mobilizon project (or the instance admin) immediately if you do inadvertently encounter user data. Do not view, alter, save, store, transfer, or otherwise access the data, and immediately purge any local information upon reporting the vulnerability;
* Contact Framasoft or a maintainer of the Mobilizon project (or the instance admin) immediately if you do inadvertently encounter user data. Do not view, alter, save, store, transfer, or otherwise access the data, and immediately purge any local information upon reporting the vulnerability;
* The lead maintainer will acknowledge your email within 48 hours, and will send a more detailed response within 48 hours indicating the next steps in handling your report. After the initial reply to your report, the security team will endeavor to keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
* Give us time to confirm, determine the affected versions and prepare fixes to correct the issue before disclosing it to other parties (if after waiting a reasonable amount of time, we are clearly unable or unwilling to do anything about it, please do hold us accountable!)
* Please test against a local instance of the software, and refrain from running any Denial of Service or automated testing tools against the project managers (and their partners') infrastructure
* Please test against a local instance of the software, and refrain from running any Denial of Service or automated testing tools against Framasoft's (and our partners') infrastructure
Note : Please report security bugs in third-party modules to the person or team maintaining the module.

View file

@ -7,6 +7,6 @@ module.exports = {
localSchemaFile: "./schema.graphql",
},
// Files processed by the extension
includes: ["src/**/*.vue", "src/**/*.js"],
includes: ["js/src/**/*.vue", "js/src/**/*.js"],
},
};

View file

@ -19,7 +19,6 @@ config :mobilizon, :instance,
registrations_open: false,
registration_email_allowlist: [],
registration_email_denylist: [],
disable_database_login: false,
languages: [],
default_language: "en",
demo: false,
@ -36,23 +35,18 @@ config :mobilizon, :instance,
unconfirmed_user_grace_period_hours: 48,
activity_expire_days: 365,
activity_keep_number: 100,
duration_of_long_event: 30,
enable_instance_feeds: true,
enable_instance_feeds: false,
email_from: "noreply@localhost",
email_reply_to: "noreply@localhost"
config :mobilizon, :groups, enabled: true
config :mobilizon, :events,
creation: true,
external: true
config :mobilizon, :events, creation: true
config :mobilizon, :restrictions, only_admin_can_create_groups: false
config :mobilizon, :restrictions, only_groups_can_create_events: false
# Configures the endpoint
config :mobilizon, Mobilizon.Web.Endpoint,
adapter: Bandit.PhoenixAdapter,
url: [
host: "mobilizon.local",
scheme: "https"
@ -60,7 +54,7 @@ config :mobilizon, Mobilizon.Web.Endpoint,
secret_key_base: "1yOazsoE0Wqu4kXk3uC5gu3jDbShOimTCzyFL3OjCdBmOXMyHX87Qmf3+Tu9s0iM",
render_errors: [view: Mobilizon.Web.ErrorView, accepts: ~w(html json)],
pubsub_server: Mobilizon.PubSub,
cache_static_manifest: "priv/static/cache_manifest.json",
cache_static_manifest: "priv/static/manifest.json",
has_reverse_proxy: true
config :mime, :types, %{
@ -70,10 +64,6 @@ config :mime, :types, %{
"application/xrd+xml" => ["xrd-xml"]
}
config :mime, :extensions, %{
"activity-json" => "application/activity+json"
}
# Upload configuration
config :mobilizon, Mobilizon.Web.Upload,
uploader: Mobilizon.Web.Upload.Uploader.Local,
@ -118,33 +108,30 @@ config :mobilizon, :media_proxy,
config :mobilizon, Mobilizon.Web.Email.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: "localhost",
# usually 25, 465 or 587
port: 25,
username: "",
password: "",
# can be `:always` or `:never`
auth: :if_available,
# can be `true`
# ssl: false,
ssl: false,
# can be `:always` or `:never`
tls: :never,
tls: :if_available,
allowed_tls_versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"],
retries: 1,
# can be `true`
no_mx_lookups: false
config :vite_phx,
release_app: :mobilizon,
# to tell prod and dev env appart
environment: config_env(),
# this manifest is different from the Phoenix "cache_manifest.json"!
# optional
vite_manifest: "priv/static/.vite/manifest.json",
# optional
dev_server_address: "http://localhost:5173"
# Configures Elixir's Logger
config :logger, :console,
backends: [:console],
format: "$time $metadata[$level] $message\n",
metadata: [:request_id, :graphql_operation_name, :user_id, :actor_name, :trace]
metadata: [:request_id]
config :logger, Sentry.LoggerBackend,
level: :warn,
capture_log_messages: true
config :mobilizon, Mobilizon.Web.Auth.Guardian,
issuer: "mobilizon",
@ -154,12 +141,13 @@ config :mobilizon, Mobilizon.Web.Auth.Guardian,
}
config :guardian, Guardian.DB,
adapter: Guardian.DB.EctoAdapter,
repo: Mobilizon.Storage.Repo,
# default
schema_name: "guardian_tokens",
# store all token types if not set
token_types: ["refresh"]
token_types: ["refresh"],
# default: 60 minutes
sweep_interval: 60
config :elixir, :time_zone_database, Tzdata.TimeZoneDatabase
@ -206,8 +194,6 @@ config :codepagex, :encodings, [
:"VENDORS/MICSFT/WINDOWS/CP1252"
]
config :gettext, :default_locale, "en"
config :mobilizon, Mobilizon.Web.Gettext, split_module_by: [:locale, :domain]
config :ex_cldr,
@ -314,24 +300,16 @@ config :mobilizon, Oban,
crontab: [
{"@hourly", Mobilizon.Service.Workers.BuildSiteMap, queue: :background},
{"17 4 * * *", Mobilizon.Service.Workers.RefreshGroups, queue: :background},
{"36 3 * * *", Mobilizon.Service.Workers.RefreshInstances, queue: :background},
{"36 * * * *", Mobilizon.Service.Workers.RefreshInstances, queue: :background},
{"@hourly", Mobilizon.Service.Workers.CleanOrphanMediaWorker, queue: :background},
{"@hourly", Mobilizon.Service.Workers.CleanUnconfirmedUsersWorker, queue: :background},
{"@hourly", Mobilizon.Service.Workers.ExportCleanerWorker, queue: :background},
{"@hourly", Mobilizon.Service.Workers.SendActivityRecapWorker, queue: :notifications},
{"@daily", Mobilizon.Service.Workers.CleanOldActivityWorker, queue: :background},
{"@daily", Mobilizon.Service.Workers.RefreshParticipantStats, queue: :background},
{"@hourly", Mobilizon.Service.Workers.CleanApplicationData,
queue: :background, args: %{type: :application_token}},
{"@hourly", Mobilizon.Service.Workers.CleanApplicationData,
queue: :background, args: %{type: :application_device_activation}}
{"@daily", Mobilizon.Service.Workers.CleanOldActivityWorker, queue: :background}
]},
{Oban.Plugins.Pruner, max_age: 300}
]
config :hammer,
backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}
config :mobilizon, :rich_media,
parsers: [
Mobilizon.Service.RichMedia.Parsers.OEmbed,
@ -369,27 +347,6 @@ config :mobilizon, :exports,
config :mobilizon, :analytics, providers: []
config :mobilizon, Mobilizon.Service.Pictures, service: Mobilizon.Service.Pictures.Unsplash
config :mobilizon, Mobilizon.Service.Pictures.Unsplash,
app_name: "Mobilizon",
access_key: nil
config :mobilizon, :search, global: [is_default_search: false, is_enabled: true]
config :mobilizon, Mobilizon.Service.GlobalSearch,
service: Mobilizon.Service.GlobalSearch.SearchMobilizon
config :mobilizon, Mobilizon.Service.GlobalSearch.SearchMobilizon,
endpoint: "https://search.joinmobilizon.org",
csp_policy: [
img_src: ["search.joinmobilizon.org"]
]
config :mobilizon, Mobilizon.Service.AntiSpam, service: Mobilizon.Service.AntiSpam.Akismet
config :mobilizon, Mobilizon.Service.SiteMap, path: "/var/lib/mobilizon/sitemap"
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"

View file

@ -5,9 +5,9 @@ config :mobilizon, Mobilizon.Web.Endpoint,
port: String.to_integer(System.get_env("MOBILIZON_INSTANCE_HOST_PORT", "4000"))
],
url: [
host: System.get_env("MOBILIZON_INSTANCE_HOST", "localhost"),
port: String.to_integer(System.get_env("MOBILIZON_INSTANCE_HOST_PORT", "4000")),
scheme: System.get_env("MOBILIZON_INSTANCE_SCHEME", "http")
host: System.get_env("MOBILIZON_INSTANCE_HOST", "mobilizon.local"),
port: String.to_integer(System.get_env("MOBILIZON_INSTANCE_HOST_PORT", "80")),
scheme: "http"
],
secret_key_base: System.get_env("MOBILIZON_INSTANCE_SECRET_KEY_BASE", "changethis"),
debug_errors: true,
@ -15,9 +15,14 @@ config :mobilizon, Mobilizon.Web.Endpoint,
check_origin: false,
watchers: [
node: [
"node_modules/.bin/vite",
"--host",
System.get_env("VITE_HOST", "localhost")
"node_modules/webpack/bin/webpack.js",
"--mode",
"development",
"--watch",
"--watch-options-stdin",
"--config",
"node_modules/@vue/cli-service/webpack.config.js",
cd: Path.expand("../js", __DIR__)
]
]
@ -49,7 +54,7 @@ config :mobilizon, Mobilizon.Web.Endpoint,
]
# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "$metadata[$level] $message\n", level: :debug
config :logger, :console, format: "[$level] $message\n", level: :debug
config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Nominatim
@ -72,9 +77,7 @@ config :mobilizon, Mobilizon.Storage.Repo,
hostname: System.get_env("MOBILIZON_DATABASE_HOST", "localhost"),
port: System.get_env("MOBILIZON_DATABASE_PORT", "5432"),
pool_size: 10,
show_sensitive_data_on_connection_error: true,
# Logging is handled by Ecto.DevLogger
log: false
show_sensitive_data_on_connection_error: true
config :mobilizon, :instance,
name: System.get_env("MOBILIZON_INSTANCE_NAME", "Mobilizon"),
@ -93,14 +96,9 @@ config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, uploads: "uploads"
config :mobilizon, :exports, path: "uploads/exports"
config :mobilizon, Mobilizon.Service.SiteMap,
path: System.get_env("MOBILIZON_SITEMAP_PATH", "priv/static")
config :tz_world, data_dir: "_build/dev/lib/tz_world/priv"
config :mobilizon, :anonymous,
reports: [
allowed: true
]
config :unplug, :init_mode, :runtime

View file

@ -1,29 +1,6 @@
# Mobilizon instance configuration
import Config
import Mobilizon.Service.Config.Helpers
{:ok, _} = Application.ensure_all_started(:tls_certificate_check)
loglevels = [
:emergency,
:alert,
:critical,
:error,
:warning,
:notice,
:info,
:debug
]
loglevel_env = System.get_env("MOBILIZON_LOGLEVEL", "error")
loglevel =
if loglevel_env in Enum.map(loglevels, &to_string/1) do
String.to_existing_atom(loglevel_env)
else
:error
end
listen_ip = System.get_env("MOBILIZON_INSTANCE_LISTEN_IP", "0.0.0.0")
@ -50,20 +27,9 @@ config :mobilizon, :instance,
description: "Change this to a proper description of your instance",
hostname: System.get_env("MOBILIZON_INSTANCE_HOST", "mobilizon.lan"),
registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN", "false") == "true",
registration_email_allowlist:
System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_EMAIL_ALLOWLIST", "")
|> String.split(",", trim: true),
registration_email_denylist:
System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_EMAIL_DENYLIST", "")
|> String.split(",", trim: true),
disable_database_login:
System.get_env("MOBILIZON_INSTANCE_DISABLE_DATABASE_LOGIN", "false") == "true",
default_language: System.get_env("MOBILIZON_INSTANCE_DEFAULT_LANGUAGE", "en"),
demo: System.get_env("MOBILIZON_INSTANCE_DEMO", "false") == "true",
allow_relay: System.get_env("MOBILIZON_INSTANCE_ALLOW_RELAY", "true") == "true",
federating: System.get_env("MOBILIZON_INSTANCE_FEDERATING", "true") == "true",
enable_instance_feeds:
System.get_env("MOBILIZON_INSTANCE_ENABLE_INSTANCE_FEEDS", "true") == "true",
demo: false,
allow_relay: true,
federating: true,
email_from: System.get_env("MOBILIZON_INSTANCE_EMAIL", "noreply@mobilizon.lan"),
email_reply_to: System.get_env("MOBILIZON_REPLY_EMAIL", "noreply@mobilizon.lan")
@ -73,25 +39,21 @@ config :mobilizon, Mobilizon.Storage.Repo,
password: System.get_env("MOBILIZON_DATABASE_PASSWORD", "password"),
database: System.get_env("MOBILIZON_DATABASE_DBNAME", "mobilizon"),
hostname: System.get_env("MOBILIZON_DATABASE_HOST", "postgres"),
port: System.get_env("MOBILIZON_DATABASE_PORT", "5432"),
ssl: System.get_env("MOBILIZON_DATABASE_SSL", "false") == "true",
port: 5432,
pool_size: 10
config :logger, level: loglevel
config :mobilizon, Mobilizon.Web.Email.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: System.get_env("MOBILIZON_SMTP_SERVER", "localhost"),
port: System.get_env("MOBILIZON_SMTP_PORT", "25"),
username: System.get_env("MOBILIZON_SMTP_USERNAME", nil),
password: System.get_env("MOBILIZON_SMTP_PASSWORD", nil),
tls: System.get_env("MOBILIZON_SMTP_TLS", "if_available"),
tls_options:
:tls_certificate_check.options(System.get_env("MOBILIZON_SMTP_SERVER", "localhost")),
tls: :if_available,
allowed_tls_versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"],
ssl: System.get_env("MOBILIZON_SMTP_SSL", "false"),
retries: 1,
no_mx_lookups: false,
auth: System.get_env("MOBILIZON_SMTP_AUTH", "if_available")
auth: :if_available
config :geolix,
databases: [
@ -105,152 +67,13 @@ config :geolix,
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local,
uploads: System.get_env("MOBILIZON_UPLOADS", "/var/lib/mobilizon/uploads")
formats =
if System.get_env("MOBILIZON_EXPORTS_FORMAT_CSV_ENABLED", "true") == "true" do
[Mobilizon.Service.Export.Participants.CSV]
else
[]
end
formats =
if System.get_env("MOBILIZON_EXPORTS_FORMAT_PDF_ENABLED", "true") == "true" do
formats ++ [Mobilizon.Service.Export.Participants.PDF]
else
formats
end
formats =
if System.get_env("MOBILIZON_EXPORTS_FORMAT_ODS_ENABLED", "true") == "true" do
formats ++ [Mobilizon.Service.Export.Participants.ODS]
else
formats
end
config :mobilizon, :exports,
path: System.get_env("MOBILIZON_UPLOADS_EXPORTS", "/var/lib/mobilizon/uploads/exports"),
formats: formats
formats: [
Mobilizon.Service.Export.Participants.CSV,
Mobilizon.Service.Export.Participants.PDF,
Mobilizon.Service.Export.Participants.ODS
]
config :tz_world,
data_dir: System.get_env("MOBILIZON_TIMEZONES_DIR", "/var/lib/mobilizon/timezones")
config :tzdata, :data_dir, System.get_env("MOBILIZON_TZDATA_DIR", "/var/lib/mobilizon/tzdata")
config :web_push_encryption, :vapid_details,
subject: System.get_env("MOBILIZON_WEB_PUSH_ENCRYPTION_SUBJECT", nil),
public_key: System.get_env("MOBILIZON_WEB_PUSH_ENCRYPTION_PUBLIC_KEY", nil),
private_key: System.get_env("MOBILIZON_WEB_PUSH_ENCRYPTION_PRIVATE_KEY", nil)
geospatial_service =
case System.get_env("MOBILIZON_GEOSPATIAL_SERVICE", "Nominatim") do
"Nominatim" -> Mobilizon.Service.Geospatial.Nominatim
"Addok" -> Mobilizon.Service.Geospatial.Addok
"Photon" -> Mobilizon.Service.Geospatial.Photon
"GoogleMaps" -> Mobilizon.Service.Geospatial.GoogleMaps
"MapQuest" -> Mobilizon.Service.Geospatial.MapQuest
"Mimirsbrunn" -> Mobilizon.Service.Geospatial.Mimirsbrunn
"Pelias" -> Mobilizon.Service.Geospatial.Pelias
"Hat" -> Mobilizon.Service.Geospatial.Hat
end
config :mobilizon, Mobilizon.Service.Geospatial, service: geospatial_service
config :mobilizon, Mobilizon.Service.Geospatial.Nominatim,
endpoint:
System.get_env(
"MOBILIZON_GEOSPATIAL_NOMINATIM_ENDPOINT",
"https://nominatim.openstreetmap.org"
),
api_key: System.get_env("MOBILIZON_GEOSPATIAL_NOMINATIM_API_KEY", nil)
config :mobilizon, Mobilizon.Service.Geospatial.Addok,
endpoint:
System.get_env("MOBILIZON_GEOSPATIAL_ADDOK_ENDPOINT", "https://api-adresse.data.gouv.fr")
config :mobilizon, Mobilizon.Service.Geospatial.Photon,
endpoint: System.get_env("MOBILIZON_GEOSPATIAL_PHOTON_ENDPOINT", "https://photon.komoot.de")
config :mobilizon, Mobilizon.Service.Geospatial.GoogleMaps,
api_key: System.get_env("MOBILIZON_GEOSPATIAL_GOOGLE_MAPS_API_KEY", nil),
fetch_place_details: true
config :mobilizon, Mobilizon.Service.Geospatial.MapQuest,
api_key: System.get_env("MOBILIZON_GEOSPATIAL_MAP_QUEST_API_KEY", nil)
config :mobilizon, Mobilizon.Service.Geospatial.Mimirsbrunn,
endpoint: System.get_env("MOBILIZON_GEOSPATIAL_MIMIRSBRUNN_ENDPOINT", nil)
config :mobilizon, Mobilizon.Service.Geospatial.Pelias,
endpoint: System.get_env("MOBILIZON_GEOSPATIAL_PELIAS_ENDPOINT", nil)
sentry_dsn = System.get_env("MOBILIZON_ERROR_REPORTING_SENTRY_DSN", nil)
included_environments = if sentry_dsn, do: ["prod"], else: []
config :sentry,
dsn: sentry_dsn,
included_environments: included_environments,
release: to_string(Application.spec(:mobilizon, :vsn))
config :logger, Sentry.LoggerBackend,
capture_log_messages: true,
level: :error
if sentry_dsn != nil do
config :mobilizon, Mobilizon.Service.ErrorReporting,
adapter: Mobilizon.Service.ErrorReporting.Sentry
end
matomo_enabled = System.get_env("MOBILIZON_FRONT_END_ANALYTICS_MATOMO_ENABLED", "false") == "true"
matomo_endpoint = System.get_env("MOBILIZON_FRONT_END_ANALYTICS_MATOMO_ENDPOINT", nil)
matomo_site_id = System.get_env("MOBILIZON_FRONT_END_ANALYTICS_MATOMO_SITE_ID", nil)
matomo_tracker_file_name =
System.get_env("MOBILIZON_FRONT_END_ANALYTICS_MATOMO_TRACKER_FILE_NAME", "matomo")
matomo_host = host_from_uri(matomo_endpoint)
analytics_providers =
if matomo_enabled do
[Mobilizon.Service.FrontEndAnalytics.Matomo]
else
[]
end
analytics_providers =
if sentry_dsn != nil do
analytics_providers ++ [Mobilizon.Service.FrontEndAnalytics.Sentry]
else
analytics_providers
end
config :mobilizon, :analytics, providers: analytics_providers
matomo_csp =
if matomo_enabled and matomo_host do
[
connect_src: [matomo_host],
script_src: [matomo_host],
img_src: [matomo_host]
]
else
[]
end
config :mobilizon, Mobilizon.Service.FrontEndAnalytics.Matomo,
enabled: matomo_enabled,
host: matomo_endpoint,
siteId: matomo_site_id,
trackerFileName: matomo_tracker_file_name,
csp: matomo_csp
config :mobilizon, Mobilizon.Service.FrontEndAnalytics.Sentry,
enabled: sentry_dsn != nil,
dsn: sentry_dsn,
tracesSampleRate: 1.0,
organization: System.get_env("MOBILIZON_ERROR_REPORTING_SENTRY_ORGANISATION", nil),
project: System.get_env("MOBILIZON_ERROR_REPORTING_SENTRY_PROJECT", nil),
host: System.get_env("MOBILIZON_ERROR_REPORTING_SENTRY_HOST", nil),
csp: [
connect_src:
System.get_env("MOBILIZON_ERROR_REPORTING_SENTRY_HOST", "") |> String.split(" ", trim: true)
]

View file

@ -16,44 +16,22 @@ config :mobilizon, Mobilizon.Web.Endpoint,
check_origin: false,
# Somehow this can't be merged properly with the dev config so we got this…
watchers: [
node: [
"node_modules/.bin/vite"
]
yarn: [cd: Path.expand("../js", __DIR__)]
]
config :vite_phx,
release_app: :mobilizon,
# Hard code :prod as an environment as :e2e will not be recongnized
environment: :prod,
vite_manifest: "priv/static/.vite/manifest.json",
phx_manifest: "priv/static/cache_manifest.json",
dev_server_address: "http://localhost:5173"
require Logger
config :mobilizon, :instance,
name: "E2E Testing instance",
description: "E2E is safety",
hostname: "mobilizon1.com",
registrations_open: true,
registration_email_denylist: ["gmail.com", "deny@tcit.fr"],
demo: false,
default_language: "en",
allow_relay: true,
federating: true,
email_from: "mobilizon@mobilizon1.com",
email_reply_to: nil,
enable_instance_feeds: true,
koena_connect_link: true,
extra_categories: [
%{
id: :something_else,
label: "Quelque chose d'autre"
}
]
cond do
System.get_env("INSTANCE_CONFIG") &&
File.exists?("./config/#{System.get_env("INSTANCE_CONFIG")}") ->
import_config System.get_env("INSTANCE_CONFIG")
config :mobilizon, Mobilizon.Storage.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("MOBILIZON_DATABASE_USERNAME", "mobilizon_e2e"),
password: System.get_env("MOBILIZON_DATABASE_PASSWORD", "mobilizon_e2e"),
database: System.get_env("MOBILIZON_DATABASE_DBNAME", "mobilizon_e2e"),
hostname: System.get_env("MOBILIZON_DATABASE_HOST", "localhost"),
port: System.get_env("MOBILIZON_DATABASE_PORT") || "5432"
System.get_env("DOCKER", "false") == "false" && File.exists?("./config/e2e.secret.exs") ->
import_config "e2e.secret.exs"
System.get_env("DOCKER", "false") == "true" ->
Logger.info("Using environment configuration for Docker")
true ->
Logger.error("No configuration file found")
end

View file

@ -30,7 +30,6 @@ config :mobilizon, :cldr,
"fr",
"gd",
"gl",
"hr",
"hu",
"id",
"it",

View file

@ -2,8 +2,7 @@ import Config
config :mobilizon, :instance,
name: "Test instance",
registrations_open: true,
duration_of_long_event: 0
registrations_open: true
# We don't run a server during test. If one is required,
# you can enable the server option below.
@ -55,11 +54,6 @@ config :mobilizon, :ldap,
bind_uid: System.get_env("LDAP_BIND_UID"),
bind_password: System.get_env("LDAP_BIND_PASSWORD")
# Faster runs in test environment
config :argon2_elixir,
t_cost: 1,
m_cost: 8
config :mobilizon, Mobilizon.Web.Email.Mailer, adapter: Swoosh.Adapters.Test
config :mobilizon, Mobilizon.Web.Upload, filters: [], link_name: false
@ -68,9 +62,6 @@ config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, uploads: "test/uploads"
config :mobilizon, :exports, path: "test/uploads/exports"
config :mobilizon, Mobilizon.Service.SiteMap,
path: System.get_env("MOBILIZON_SITEMAP_PATH", "test/sitemap")
config :tz_world, data_dir: "_build/test/lib/tz_world/priv"
config :tesla, Mobilizon.Service.HTTP.ActivityPub,
@ -87,7 +78,7 @@ config :tesla, Mobilizon.Service.HTTP.HostMetaClient,
config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Mock
config :mobilizon, Oban, testing: :manual
config :mobilizon, Oban, queues: false, plugins: false
config :mobilizon, Mobilizon.Web.Auth.Guardian, secret_key: "some secret"
@ -97,10 +88,6 @@ config :mobilizon, Mobilizon.Web.Gettext, allowed_locales: ["fr", "en", "es", "r
config :junit_formatter, report_dir: "."
config :mobilizon, :http_security, report_uri: "https://endpoint.com"
config :mobilizon, Mobilizon.Service.AntiSpam, service: Mobilizon.Service.AntiSpam.Mock
if System.get_env("DOCKER", "false") == "false" && File.exists?("./config/test.secret.exs") do
import_config "test.secret.exs"
end

View file

@ -1,87 +0,0 @@
{
lib,
beam_nox,
fetchFromGitHub,
cmake,
nixosTests,
src,
src-config,
mobilizon-js,
}:
let
inherit (beam_nox.packages.erlang) mixRelease buildMix elixir;
in
mixRelease rec {
pname = "mobilizon";
# This has to be kept in sync with the version in mix.exs and package.json!
# Otherwise the nginx routing isn't going to work properly.
version = "5.0.0-beta.1";
inherit src;
# Update deps.nix by running `mix deps.nix`
mixNixDeps = import ./deps.nix {
inherit lib;
beamPackages = beam_nox.packages.erlang;
overrides = (
final: prev:
(lib.mapAttrs (_: value: value.override { appConfigPath = src-config; }) prev)
// {
fast_html = prev.fast_html.override { nativeBuildInputs = [ cmake ]; };
ex_cldr = prev.ex_cldr.overrideAttrs (old: {
# We have to use the GitHub sources, as it otherwise tries to download
# the locales at build time.
src = fetchFromGitHub {
owner = "elixir-cldr";
repo = "cldr";
rev = "v${old.version}";
sha256 =
assert old.version == "2.37.5";
"sha256-T5Qvuo+xPwpgBsqHNZYnTCA4loToeBn1LKTMsDcCdYs=";
};
postInstall = ''
cp $src/priv/cldr/locales/* $out/lib/erlang/lib/ex_cldr-${old.version}/priv/cldr/locales/
'';
});
}
);
};
# fix elixir locale warning
env.LANG = "C.UTF-8";
# Install the compiled js part
preBuild = ''
cp -a "${mobilizon-js}/_napalm-install/priv/static" ./priv
chmod 770 -R ./priv
'';
postBuild = ''
mix phx.digest --no-deps-check
'';
# Just a hack to reduce path size by 60MB
postInstall =
let
inherit (mixNixDeps) ex_cldr;
in
''
rm -r $out/lib/ex_cldr-${ex_cldr.version}/priv/cldr/locales
ln -s ${ex_cldr.src}/priv/cldr/locales $out/lib/ex_cldr-${ex_cldr.version}/priv/cldr/locales
'';
passthru.elixirPackage = elixir;
meta = with lib; {
description = "Mobilizon is an online tool to help manage your events, your profiles and your groups";
homepage = "https://joinmobilizon.org/";
license = licenses.agpl3Plus;
maintainers = with maintainers; [
minijackson
erictapen
];
};
}

2226
deps.nix

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ services:
MIX_ENV: "test"
MOBILIZON_DATABASE_DBNAME: mobilizon_test
MOBILIZON_INSTANCE_HOST: mobilizon.test
command: "mix prepare_test && mix test"
command: "mix test"
volumes:
pgdata:
.:

View file

@ -19,7 +19,6 @@ services:
- ".:/app"
ports:
- 4000:4000
- 5173:5173
depends_on:
- postgres
environment:
@ -36,7 +35,6 @@ services:
MOBILIZON_DATABASE_DBNAME: ${POSTGRES_DB}
MOBILIZON_DATABASE_HOST: postgres
MOBILIZON_DATABASE_PORT: ${POSTGRES_PORT}
VITE_HOST: ${VITE_HOST:-localhost}
command: sh -c "mix phx.server"
volumes:
pgdata:

View file

@ -1,27 +1,21 @@
ARG IMAGE="elixir:1.16"
FROM ${IMAGE} as build
FROM elixir as build
SHELL ["/bin/bash", "-c"]
ENV MIX_ENV prod
# ENV LANG en_US.UTF-8
ARG APP_ASSET
# Fix qemu segfault on arm64
# See https://github.com/plausible/analytics/pull/2879 and https://github.com/erlang/otp/pull/6340
ARG ERL_FLAGS=""
ENV ERL_FLAGS=$ERL_FLAGS
# Set the right versions
ENV ELIXIR_VERSION latest
ENV ERLANG_VERSION latest
ENV NODE_VERSION 20
ENV NODE_VERSION 16
# Install system dependencies
RUN apt-get update -yq && apt-get install -yq build-essential cmake postgresql-client git curl gnupg unzip exiftool webp imagemagick gifsicle
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# # Install Node
# # Install Node & yarn
# RUN curl -sL https://deb.nodesource.com/setup_16.x | bash && apt-get install nodejs -yq
# RUN npm install -g yarn
# Install build tools
RUN source /root/.bashrc && \
@ -33,15 +27,14 @@ COPY ./ /mobilizon
WORKDIR /mobilizon
# # Build front-end
# RUN npm install
# RUN npm run build
# RUN yarn --cwd "js" install --frozen-lockfile
# RUN yarn --cwd "js" run build
# Elixir release
RUN source /root/.bashrc && \
mix deps.get --only prod && \
mix compile && \
mix phx.digest.clean --all && \
mix phx.digest && \
mix release --path release/mobilizon && \
cd release/mobilizon && \
ln -s lib/mobilizon-*/priv priv && \

View file

@ -1,20 +1,18 @@
# First build the application assets
FROM node:20-alpine as assets
FROM node:16-alpine as assets
RUN apk add --no-cache python3 build-base libwebp-tools bash imagemagick ncurses
WORKDIR /build
COPY . .
COPY js .
ENV CYPRESS_INSTALL_BINARY 0
# Network timeout because it's slow when cross-compiling
RUN npm install && npm run build
RUN yarn install --network-timeout 100000 \
&& yarn run build
# Then, build the application binary
FROM elixir:1.16-alpine AS builder
# Fix qemu segfault on arm64
# See https://github.com/plausible/analytics/pull/2879 and https://github.com/erlang/otp/pull/6340
ARG ERL_FLAGS=""
ENV ERL_FLAGS=$ERL_FLAGS
FROM elixir:1.13-alpine AS builder
RUN apk add --no-cache build-base git cmake
@ -30,9 +28,10 @@ COPY config/config.exs config/prod.exs ./config/
COPY config/docker.exs ./config/runtime.exs
COPY rel ./rel
COPY support ./support
COPY --from=assets /build/priv/static ./priv/static
COPY --from=assets ./priv/static ./priv/static
RUN mix phx.digest.clean --all && mix phx.digest && mix release
RUN mix phx.digest.clean --all \
&& mix release
# Finally setup the app
FROM alpine
@ -51,23 +50,16 @@ LABEL org.opencontainers.image.title="mobilizon" \
org.opencontainers.image.created=$BUILD_DATE
RUN apk add --no-cache curl openssl ca-certificates ncurses-libs file postgresql-client libgcc libstdc++ imagemagick python3 py3-pip py3-pillow py3-cffi py3-brotli gcc g++ musl-dev python3-dev pango libxslt-dev ttf-cantarell
RUN pip --no-cache-dir install --break-system-packages weasyprint pyexcel-ods3
RUN pip install weasyprint pyexcel-ods3
# Create every data directory
RUN mkdir -p /var/lib/mobilizon/uploads && chown nobody:nobody /var/lib/mobilizon/uploads
RUN mkdir -p /var/lib/mobilizon/timezones && chown nobody:nobody /var/lib/mobilizon/timezones
RUN mkdir -p /var/lib/mobilizon/tzdata && chown nobody:nobody /var/lib/mobilizon/tzdata
RUN mkdir -p /var/lib/mobilizon/sitemap && chown nobody:nobody /var/lib/mobilizon/sitemap
RUN mkdir -p /var/lib/mobilizon/uploads/exports/{csv,pdf,ods} && chown -R nobody:nobody /var/lib/mobilizon/uploads/exports
# Create configuration directory
RUN mkdir -p /var/lib/mobilizon/timezones
RUN curl -L 'https://packages.joinmobilizon.org/tz_world/timezones-geodata.dets' -o /var/lib/mobilizon/timezones/timezones-geodata.dets
RUN chown nobody:nobody /var/lib/mobilizon/timezones
RUN mkdir -p /etc/mobilizon && chown nobody:nobody /etc/mobilizon
USER nobody
# Get timezone geodata
RUN curl -L 'https://packages.joinmobilizon.org/tz_world/timezones-geodata.dets' -o /var/lib/mobilizon/timezones/timezones-geodata.dets
EXPOSE 4000
ENV MOBILIZON_DOCKER=true

View file

@ -3,12 +3,12 @@
set -e
echo "-- Waiting for database..."
while ! pg_isready -U ${MOBILIZON_DATABASE_USERNAME} -d postgres://${MOBILIZON_DATABASE_HOST}:${MOBILIZON_DATABASE_PORT:-5432}/${MOBILIZON_DATABASE_DBNAME} -t 1; do
while ! pg_isready -U ${MOBILIZON_DATABASE_USERNAME} -d postgres://${MOBILIZON_DATABASE_HOST}:5432/${MOBILIZON_DATABASE_DBNAME} -t 1; do
sleep 1s
done
PGPASSWORD=$MOBILIZON_DATABASE_PASSWORD psql -U $MOBILIZON_DATABASE_USERNAME -d $MOBILIZON_DATABASE_DBNAME -h $MOBILIZON_DATABASE_HOST -p ${MOBILIZON_DATABASE_PORT:-5432} -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm;'
PGPASSWORD=$MOBILIZON_DATABASE_PASSWORD psql -U $MOBILIZON_DATABASE_USERNAME -d $MOBILIZON_DATABASE_DBNAME -h $MOBILIZON_DATABASE_HOST -p ${MOBILIZON_DATABASE_PORT:-5432} -c 'CREATE EXTENSION IF NOT EXISTS unaccent;'
PGPASSWORD=$MOBILIZON_DATABASE_PASSWORD psql -U $MOBILIZON_DATABASE_USERNAME -d $MOBILIZON_DATABASE_DBNAME -h $MOBILIZON_DATABASE_HOST -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm;'
PGPASSWORD=$MOBILIZON_DATABASE_PASSWORD psql -U $MOBILIZON_DATABASE_USERNAME -d $MOBILIZON_DATABASE_DBNAME -h $MOBILIZON_DATABASE_HOST -c 'CREATE EXTENSION IF NOT EXISTS unaccent;'
echo "-- Running migrations..."
/bin/mobilizon_ctl migrate

View file

@ -1,10 +1,11 @@
FROM elixir:latest
LABEL maintainer="Thomas Citharel <tcit@tcit.fr>"
ENV REFRESHED_AT=2024-02-29
RUN apt-get update -yq && apt-get install -yq ca-certificates build-essential inotify-tools postgresql-client git curl gnupg xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 cmake exiftool python3-pip python3-setuptools
RUN mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && apt-get update && apt-get install nodejs -yq
RUN npm install -g wait-on
ENV REFRESHED_AT=2022-04-06
RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 cmake exiftool python3-pip python3-setuptools
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash && apt-get install nodejs -yq
RUN npm install -g yarn wait-on
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mix local.hex --force && mix local.rebar --force
RUN pip --no-cache-dir install --break-system-packages weasyprint pyexcel-ods3
RUN pip3 install -Iv weasyprint pyexcel_ods3
RUN curl https://dbip.mirror.framasoft.org/files/dbip-city-lite-latest.mmdb --output GeoLite2-City.mmdb -s && mkdir -p /usr/share/GeoIP && mv GeoLite2-City.mmdb /usr/share/GeoIP/

View file

@ -1,30 +0,0 @@
# Documentation for developpers
_This file is a summary of the documentation for developpers. As explained in [CONTRIBUTING.md](../CONTRIBUTING.md), the main documentation is available at <https://docs.joinmobilizon.org/contribute/>_
## Technologies
Mobilizon is an app that uses:
* [Elixir](https://elixir-lang.org/) for backend,
* [VueJS](https://vuejs.org/) for front-end
* [GraphQL](https://graphql.org/) as it's API layer
[GraphQL](https://graphql.org/) is managed using:
* [Absinthe](https://absinthe-graphql.org/) on the backend
* [VueApollo](https://apollo.vuejs.org/) on the front-end.
[UI](https://en.wikipedia.org/wiki/User_interface) is handled with [Tailwind](https://tailwindcss.com/) and [Oruga](https://oruga.io/).
## Structure of sources
* `config` backend compile-time and runtime configuration
* `docker` 🐳
* `src` Front-end
* `lib/federation` Handling all the federation stuff (sending and receving activities, converting activities, signatures, helpers…)
* `lib/graphql/schema` The schema declarations for the GraphQL API
* `lib/graphql/resolvers` The logic behind the GraphQL API
* `lib/mix/tasks` CLI
* `lib/mobilizon` model structures, database queries
* `lib/service` various services
* `lib/web` controllers, middlewares, auth-related stuff
* `test` tests

12
env.d.ts vendored
View file

@ -1,12 +0,0 @@
/// <reference types="histoire/vue" />
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_SERVER_URL: string;
readonly VITE_HISTOIRE_ENV: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}

View file

@ -1,66 +1,12 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"napalm": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717929455,
"narHash": "sha256-BiI5xWygriOJuNISnGAeL0KYxrEMnjgpg+7wDskVBhI=",
"owner": "nix-community",
"repo": "napalm",
"rev": "e1babff744cd278b56abe8478008b4a9e23036cf",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "napalm",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1710156097,
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "3342559a24e85fc164b295c3444e8a139924675b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1726463316,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
"lastModified": 1691368598,
"narHash": "sha256-ia7li22keBBbj02tEdqjVeLtc7ZlSBuhUk+7XTUFr14=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
"rev": "5a8e9243812ba528000995b294292d3b5e120947",
"type": "github"
},
"original": {
@ -72,25 +18,8 @@
},
"root": {
"inputs": {
"napalm": "napalm",
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

473
flake.nix
View file

@ -1,462 +1,27 @@
{
description = "Mobilizon fork for potsda.mn";
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-filter.url = "github:numtide/nix-filter";
napalm.url = "github:nix-community/napalm";
napalm.inputs.nixpkgs.follows = "nixpkgs";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{
self,
nixpkgs,
nix-filter,
napalm,
}:
let
forAllSystems =
f:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
] (system: f system);
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
filter = nix-filter.lib;
in
{
outputs = { self, nixpkgs }: {
packages = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
# Directories that are neither needed for building the frontend nor the backend.
# For better build caching.
unrelatedDirs = [
"flake.lock"
(filter.matchExt "nix")
"docs"
"docker"
"docker-compose.test.yml"
"docker-compose.yml"
"generate-test-data"
];
in
{
mobilizon = pkgs.callPackage ./. {
src = filter {
root = ./.;
exclude = [
"src"
(filter.matchExt "js")
(filter.matchExt "ts")
(filter.matchExt "json")
"tests"
"scripts"
"public"
] ++ unrelatedDirs;
};
src-config = ./config;
mobilizon-js = self.packages."${system}".mobilizon-frontend;
};
packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
mobilizon-frontend =
napalm.legacyPackages."${system}".buildPackage
(filter {
root = ./.;
exclude = [
"lib"
"config"
"test"
"rel"
"support"
] ++ unrelatedDirs;
})
{
inherit (pkgs) nodejs;
nativeBuildInputs = [ pkgs.imagemagick ];
npmCommands = [
"npm install"
"npm run build"
];
# Keep this in sync with the content of ./patches/
customPatchPackages = {
vue-i18n-extract."2.0.7" = pkgs: prev: {
preConfigure = ''
${pkgs.git}/bin/git apply -p3 ${./patches/vue-i18n-extract+2.0.7.patch}
'';
};
};
};
default = self.packages."${system}".mobilizon;
}
);
devShells = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
settingsFormat = pkgs.formats.elixirConf { };
mobilizonConfig = settingsFormat.generate "runtime.exs" {
":mobilizon" = {
"Mobilizon.Web.Endpoint" = {
server = true;
url.host = "mobilizon.dev";
http = {
ip = settingsFormat.lib.mkTuple [
0
0
0
0
0
0
0
1
];
port = 4000;
};
secret_key_base = "2q/l1WDx3RQQy7gZ1k001//6nc66moWUEJQyGuMK/z3zPLYW6FYtIgCkUzGP0+X/";
};
"Mobilizon.Web.Auth.Guardian" = {
secret_key = "N8x7/tf0kInLFS2poO22g6OGPiMjSrDEhmk29nFqV35q7hQ0DtBt/cRYCsqBNp2L";
};
":instance" = {
name = "Mobilizon";
description = "Change this to a proper description of your instance";
hostname = "mobilizon.dev";
registrations_open = true;
email_from = "noreply@mobilizon.dev";
email_reply_to = "noreply@mobilizon.dev";
};
"Mobilizon.Storage.Repo" = {
adapter = settingsFormat.lib.mkAtom "Ecto.Adapters.Postgres";
pool_size = 10;
username = "mobilizon";
database = "mobilizon";
socket_dir = "/var/run/postgresql";
};
};
};
in
{
default = pkgs.mkShell {
MIX_ENV = "dev";
PGUSER = "mobilizon";
PGDATABASE = "mobilizon";
buildInputs = with pkgs; [
elixir
cmake
imagemagick
nodejs
inotify-tools
(pkgs.writeShellApplication {
name = "build";
runtimeInputs = [
elixir
nodejs
];
text = ''
mix deps.get
mix deps.nix
mix deps.compile
mix phx.digest
npm install
npm run build
'';
})
(pkgs.writeShellApplication {
name = "setup";
runtimeInputs = [
elixir
postgresql
];
text = ''
cat ${mobilizonConfig} > config/runtime.exs
# We assume the database already exists
sudo -u postgres psql -d mobilizon << SQL
create extension if not exists postgis;
create extension if not exists unaccent;
create extension if not exists pg_trgm;
SQL
mix ecto.migrate
'';
})
(pkgs.writeShellApplication {
name = "start";
runtimeInputs = [ elixir ];
text = ''
mix phx.server
'';
})
(pkgs.writeShellApplication {
name = "clean";
runtimeInputs = [ postgresql ];
text = ''
rm -rf deps/ _build/ node_modules/
sudo -u postgres psql -c "DROP DATABASE mobilizon;"
sudo systemctl restart postgresql.service
'';
})
];
};
}
);
nixosModules.devSetup =
{
config,
lib,
pkgs,
...
}:
let
cfg = config.mobilizonDevEnvironment;
in
{
options.mobilizonDevEnvironment = {
enable = lib.mkEnableOption (lib.mdDoc "development environment for Mobilizon");
user = lib.mkOption {
type = lib.types.str;
description = "Unix user that runs the backend application to connect to the database";
};
};
config = lib.mkIf cfg.enable {
services.postgresql = {
enable = true;
ensureDatabases = [ "mobilizon" ];
ensureUsers = [
{
name = "mobilizon";
ensureDBOwnership = true;
}
];
extraPlugins = with config.services.postgresql.package.pkgs; [ postgis ];
identMap = ''
map-mobilizon ${cfg.user} mobilizon
'';
authentication = ''
local all mobilizon ident map=map-mobilizon
'';
};
};
};
overlays.default = final: prev: { inherit (self.packages."${prev.system}") mobilizon; };
checks = forAllSystems (system: {
inherit (self.packages.${system}) mobilizon;
nixosTest =
let
pkgsMobilizon = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
certs = import "${nixpkgs}/nixos/tests/common/acme/server/snakeoil-certs.nix";
test = import ./integration-test.nix { inherit certs; };
in
pkgsMobilizon.nixosTest test;
});
lib = {
# Patch the logos in the source tree of a mobilizon-frontend package before building.
# Can be used to construct the argument for .overrideAttrs on mobilizon-frontend.
mobilizonLogosOverride =
icons:
let
inherit (icons) logo favicon;
in
old: {
postPatch =
''
cp '${logo}' src/assets/logo.svg
magick convert \
-resize x16 \
-gravity center \
-crop 16x16+0+0 \
-flatten \
-colors 256 \
'${favicon}' \
public/img/icons/favicon-16x16.png
magick convert \
-resize x32 \
-gravity center \
-crop 32x32+0+0 \
-flatten \
-colors 256 \
'${favicon}' \
public/img/icons/favicon-32x32.png
magick convert \
-resize x16 \
-gravity center \
-crop 16x16+0+0 \
-flatten \
-colors 256 \
'${favicon}' \
favicon-16x16.ico
magick convert \
-resize x32 \
-gravity center \
-crop 32x32+0+0 \
-flatten \
-colors 256 \
'${favicon}' \
favicon-32x32.ico
magick convert \
-resize x48 \
-gravity center \
-crop 48x48+0+0 \
-flatten \
-colors 256 \
'${favicon}' \
favicon-48x48.ico
magick convert \
favicon-16x16.ico \
favicon-32x32.ico \
favicon-48x48.ico \
public/favicon.ico
rm favicon-16x16.ico favicon-32x32.ico favicon-48x48.ico
cp '${favicon}' public/img/icons/favicon.svg
cp '${favicon}' public/img/icons/safari-pinned-tab.svg
magick convert \
'${favicon}' \
-gravity center \
-extent 630x350 \
public/img/mobilizon_default_card.png
magick convert \
-background '#e08c96' \
'${logo}' \
-resize 366x108 \
public/img/mobilizon_logo.png
''
+
nixpkgs.lib.concatMapStrings
(
{ resize, filename }:
''
magick convert \
-resize x${resize} \
'${favicon}' \
public/img/icons/${filename}
''
)
[
{
resize = "180";
filename = "apple-touch-icon.png";
}
{
resize = "180";
filename = "apple-touch-icon-180x180.png";
}
{
resize = "152";
filename = "apple-touch-icon-152x152.png";
}
{
resize = "120";
filename = "apple-touch-icon-120x120.png";
}
{
resize = "76";
filename = "apple-touch-icon-76x76.png";
}
{
resize = "60";
filename = "apple-touch-icon-60x60.png";
}
{
resize = "192";
filename = "android-chrome-192x192.png";
}
{
resize = "512";
filename = "android-chrome-512x512.png";
}
{
resize = "192";
filename = "android-chrome-maskable-192x192.png";
}
{
resize = "512";
filename = "android-chrome-maskable-512x512.png";
}
{
resize = "128";
filename = "badge-128x128.png";
}
{
resize = "144";
filename = "icon-144x144.png";
}
{
resize = "168";
filename = "icon-168x168.png";
}
{
resize = "256";
filename = "icon-256x256.png";
}
{
resize = "48";
filename = "icon-48x48.png";
}
{
resize = "72";
filename = "icon-72x72.png";
}
{
resize = "96";
filename = "icon-96x96.png";
}
{
resize = "144";
filename = "msapplication-icon-144x144.png";
}
{
resize = "150";
filename = "mstile-150x150.png";
}
{
resize = "192";
filename = "android-chrome-192x192.png";
}
{
resize = "512";
filename = "android-chrome-512x512.png";
}
{
resize = "192";
filename = "android-chrome-maskable-192x192.png";
}
{
resize = "512";
filename = "android-chrome-maskable-512x512.png";
}
];
};
};
formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
devShells.x86_64-linux.default = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in pkgs.mkShell {
buildInputs = with pkgs; [
elixir
cmake
imagemagick
(yarn.override {
nodejs = nodejs-18_x;
})
nodejs-18_x
];
};
};
}

View file

@ -1,52 +0,0 @@
/// <reference types="@histoire/plugin-vue/components" />
import { defineConfig } from "histoire";
import { HstVue } from "@histoire/plugin-vue";
import path from "path";
export default defineConfig({
plugins: [HstVue()],
setupFile: path.resolve(__dirname, "./src/histoire.setup.ts"),
viteNodeInlineDeps: [/date-fns/],
// viteIgnorePlugins: ['vite-plugin-pwa', 'vite-plugin-pwa:build', 'vite-plugin-pwa:info'],
tree: {
groups: [
{
title: "Actors",
include: (file) => /^src\/components\/Account/.test(file.path),
},
{
title: "Address",
include: (file) => /^src\/components\/Address/.test(file.path),
},
{
title: "Comments",
include: (file) => /^src\/components\/Comment/.test(file.path),
},
{
title: "Discussion",
include: (file) => /^src\/components\/Discussion/.test(file.path),
},
{
title: "Events",
include: (file) => /^src\/components\/Event/.test(file.path),
},
{
title: "Groups",
include: (file) => /^src\/components\/Group/.test(file.path),
},
{
title: "Home",
include: (file) => /^src\/components\/Home/.test(file.path),
},
{
title: "Posts",
include: (file) => /^src\/components\/Post/.test(file.path),
},
{
title: "Others",
include: () => true,
},
],
},
});

View file

@ -1,49 +0,0 @@
{ certs }:
{ lib, ... }:
let
mobilizonDomain = certs.domain;
port = 41395;
in
{
name = "mobilizon";
meta.maintainers = with lib.maintainers; [
minijackson
erictapen
];
nodes.server =
{ pkgs, ... }:
{
services.mobilizon = {
enable = true;
settings = {
":mobilizon" = {
":instance" = {
name = "Test Mobilizon";
hostname = mobilizonDomain;
};
"Mobilizon.Web.Endpoint".http.port = port;
};
};
};
services.postgresql.package = pkgs.postgresql_14;
security.pki.certificateFiles = [ certs.ca.cert ];
services.nginx.virtualHosts."${mobilizonDomain}" = {
enableACME = lib.mkForce false;
sslCertificate = certs.${mobilizonDomain}.cert;
sslCertificateKey = certs.${mobilizonDomain}.key;
};
networking.hosts."::1" = [ mobilizonDomain ];
};
testScript = ''
server.wait_for_unit("mobilizon.service")
server.wait_for_open_port(${toString port})
server.succeed("curl --fail https://${mobilizonDomain}/")
'';
}

View file

@ -1,6 +1,3 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
root: true,
@ -9,11 +6,10 @@ module.exports = {
},
extends: [
"plugin:vue/essential",
"eslint:recommended",
"plugin:vue/vue3-essential",
"@vue/eslint-config-typescript/recommended",
"@vue/typescript/recommended",
"plugin:prettier/recommended",
"@vue/eslint-config-prettier",
],
plugins: ["prettier"],
@ -24,11 +20,12 @@ module.exports = {
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-underscore-dangle": [
"error",
{
allow: ["__typename", "__schema"],
allow: ["__typename"],
},
],
"@typescript-eslint/no-explicit-any": "off",
@ -53,7 +50,4 @@ module.exports = {
},
ignorePatterns: ["src/typings/*.d.ts", "vue.config.js"],
globals: {
GeolocationPositionError: true,
},
};

25
js/.gitignore vendored Normal file
View file

@ -0,0 +1,25 @@
.DS_Store
node_modules
/dist
/tests/e2e/videos/
/tests/e2e/screenshots/
/coverage
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

2
js/.prettierignore Normal file
View file

@ -0,0 +1,2 @@
src/i18n/*.json
coverage/

41
js/README.md Normal file
View file

@ -0,0 +1,41 @@
# mobilizon
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Run your unit tests
```
yarn test:unit
```
### Run your end-to-end tests
```
yarn test:e2e
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

3
js/babel.config.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
};

7
js/cypress.json Normal file
View file

@ -0,0 +1,7 @@
{
"pluginsFile": "tests/e2e/plugins/index.js",
"projectId": "86dpkx",
"baseUrl": "http://localhost:4000",
"viewportWidth": 1920,
"viewportHeight": 1080
}

View file

@ -1,5 +1,5 @@
import fetch from "node-fetch";
import fs from "fs";
const fetch = require("node-fetch");
const fs = require("fs");
fetch(`http://localhost:4000/api`, {
method: "POST",

20
js/jest.config.js Normal file
View file

@ -0,0 +1,20 @@
module.exports = {
preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
collectCoverage: true,
collectCoverageFrom: [
"**/*.{vue,ts}",
"!**/node_modules/**",
"!get_union_json.ts",
],
coverageReporters: ["html", "text", "text-summary"],
reporters: ["default", "jest-junit"],
// The following should fix the issue with svgs and ?inline loader (see Logo.vue), but doesn't work
//
// transform: {
// "^.+\\.svg$": "<rootDir>/tests/unit/svgTransform.js",
// },
// moduleNameMapper: {
// "^@/(.*svg)(\\?inline)$": "<rootDir>/src/$1",
// "^@/(.*)$": "<rootDir>/src/$1",
// },
};

129
js/package.json Normal file
View file

@ -0,0 +1,129 @@
{
"name": "mobilizon",
"version": "2.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "yarn run build:assets && yarn run build:pictures",
"test:unit": "LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 TZ=UTC vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"build:assets": "vue-cli-service build --report",
"build:pictures": "bash ./scripts/build/pictures.sh"
},
"dependencies": {
"@absinthe/socket": "^0.2.1",
"@absinthe/socket-apollo-link": "^0.2.1",
"@apollo/client": "^3.3.16",
"@mdi/font": "^6.1.95",
"@sentry/tracing": "^6.16.1",
"@sentry/vue": "^6.16.1",
"@tailwindcss/line-clamp": "^0.4.0",
"@tiptap/core": "^2.0.0-beta.41",
"@tiptap/extension-blockquote": "^2.0.0-beta.25",
"@tiptap/extension-bold": "^2.0.0-beta.24",
"@tiptap/extension-bubble-menu": "^2.0.0-beta.9",
"@tiptap/extension-bullet-list": "^2.0.0-beta.23",
"@tiptap/extension-document": "^2.0.0-beta.15",
"@tiptap/extension-dropcursor": "^2.0.0-beta.25",
"@tiptap/extension-gapcursor": "^2.0.0-beta.33",
"@tiptap/extension-heading": "^2.0.0-beta.23",
"@tiptap/extension-history": "^2.0.0-beta.21",
"@tiptap/extension-image": "^2.0.0-beta.6",
"@tiptap/extension-italic": "^2.0.0-beta.24",
"@tiptap/extension-link": "^2.0.0-beta.8",
"@tiptap/extension-list-item": "^2.0.0-beta.19",
"@tiptap/extension-mention": "^2.0.0-beta.42",
"@tiptap/extension-ordered-list": "^2.0.0-beta.24",
"@tiptap/extension-paragraph": "^2.0.0-beta.22",
"@tiptap/extension-strike": "^2.0.0-beta.26",
"@tiptap/extension-text": "^2.0.0-beta.15",
"@tiptap/extension-underline": "^2.0.0-beta.7",
"@tiptap/vue-2": "^2.0.0-beta.21",
"@vue-a11y/announcer": "^2.1.0",
"@vue-a11y/skip-to": "^2.1.2",
"@vue/apollo-option": "4.0.0-alpha.11",
"apollo-absinthe-upload-link": "^1.5.0",
"autoprefixer": "^10",
"blurhash": "^1.1.3",
"buefy": "^0.9.0",
"bulma-divider": "^0.2.0",
"core-js": "^3.6.4",
"date-fns": "^2.16.0",
"date-fns-tz": "^1.1.6",
"graphql": "^16.0.0",
"graphql-tag": "^2.10.3",
"intersection-observer": "^0.12.0",
"jwt-decode": "^3.1.2",
"leaflet": "^1.4.0",
"leaflet.locatecontrol": "^0.76.0",
"lodash": "^4.17.11",
"ngeohash": "^0.6.3",
"p-debounce": "^4.0.0",
"phoenix": "^1.6",
"postcss": "^8",
"register-service-worker": "^1.7.2",
"sanitize-html": "^2.5.3",
"tailwindcss": "^3",
"tippy.js": "^6.2.3",
"unfetch": "^4.2.0",
"v-tooltip": "^2.1.3",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-i18n": "^8.14.0",
"vue-matomo": "^4.1.0",
"vue-meta": "^2.3.1",
"vue-plausible": "^1.3.1",
"vue-property-decorator": "^9.0.0",
"vue-router": "^3.1.6",
"vue-scrollto": "^2.17.1",
"vue2-leaflet": "^2.0.3",
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.0",
"@types/jest": "^27.0.2",
"@types/leaflet": "^1.5.2",
"@types/leaflet.locatecontrol": "^0.74",
"@types/lodash": "^4.14.141",
"@types/ngeohash": "^0.6.2",
"@types/phoenix": "^1.5.2",
"@types/prosemirror-inputrules": "^1.0.2",
"@types/prosemirror-model": "^1.7.2",
"@types/prosemirror-state": "^1.2.4",
"@types/prosemirror-view": "^1.11.4",
"@types/sanitize-html": "^2.5.0",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"@vue/cli-plugin-babel": "~5.0.4",
"@vue/cli-plugin-eslint": "~5.0.4",
"@vue/cli-plugin-pwa": "~5.0.4",
"@vue/cli-plugin-router": "~5.0.4",
"@vue/cli-plugin-typescript": "~5.0.4",
"@vue/cli-plugin-unit-jest": "~5.0.4",
"@vue/cli-service": "~5.0.4",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/test-utils": "^1.1.0",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"@vue/vue3-jest": "^27.0.0-alpha.1",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.0.3",
"flush-promises": "^1.0.2",
"jest": "^27.1.0",
"jest-junit": "^13.0.0",
"mock-apollo-client": "^1.1.0",
"prettier": "^2.2.1",
"prettier-eslint": "^14.0.0",
"sass": "^1.34.1",
"sass-loader": "^12.0.0",
"ts-jest": "27",
"typescript": "~4.5.5",
"vue-cli-plugin-tailwind": "~3.0.0",
"vue-i18n-extract": "^2.0.4",
"vue-template-compiler": "^2.6.11",
"webpack-cli": "^4.7.0"
}
}

View file

@ -1,4 +1,4 @@
export default {
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 791 B

View file

Before

Width:  |  Height:  |  Size: 1,015 B

After

Width:  |  Height:  |  Size: 1,015 B

View file

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 857 B

View file

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 857 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.9 KiB

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Some files were not shown because too many files have changed in this diff Show more