Optimized LDAP implementation for Snipe-IT and implemented Mobilizon draft

This commit is contained in:
2025-07-01 09:08:12 +02:00
parent 4963503f2c
commit abc9a46667
38 changed files with 517 additions and 140 deletions

View File

@@ -0,0 +1,29 @@
# Mobilizon
## Description
Experience Mobilizon, an open-source event management platform that empowers communities to create, manage, and attend events with ease. Mobilizon puts privacy and decentralization first, giving you full control over your data and how you engage with your audience.
## Overview
This role deploys Mobilizon using Docker, automating the setup of your event management platform along with its underlying database. With support for health checks, persistent storage for uploads and configuration, and seamless integration with an Nginx reverse proxy, Mobilizon is configured to provide reliable and scalable event hosting for your community.
## Features
- **Event Scheduling:** Create and manage events with rich metadata and RSVP functionality.
- **Community-Driven:** Foster connections with built-in discussion and follow features for organizers and participants.
- **Privacy-First:** Self-hosted solution ensures data ownership and GDPR-compliance.
- **Customizable Setup:** Configure database connections, instance settings, and admin credentials via environment variables and a TOML configuration file.
- **Scalable Deployment:** Use Docker to ensure your event platform grows seamlessly with your communitys needs.
## Additional Resources
- [Mobilizon Official Website](https://mobilizon.org)
## Credits
Developed and maintained by **Kevin Veen-Birkenbach**.
Learn more at [veen.world](https://www.veen.world).
Part of the [CyMaIS Project](https://github.com/kevinveenbirkenbach/cymais)
Licensed under [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)

View File

@@ -0,0 +1,2 @@
# Todo
- Implement

View File

@@ -0,0 +1,22 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Experience Mobilizon, an open-source event management platform that empowers communities to create, manage, and attend events with ease, prioritizing privacy and decentralization."
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
galaxy_tags:
- mobilizon
- docker
- event-management
- open-source
repository: "https://s.veen.world/cymais"
issue_tracker_url: "https://s.veen.world/cymaisissues"
documentation: "https://s.veen.world/cymais"
logo:
class: "fa-solid fa-calendar-days"
run_after:
- "docker-postgres"

View File

@@ -0,0 +1,9 @@
credentials:
secret_key_base:
description: "Secret key base used to generate secrets for encrypting and signing data"
algorithm: "alphanumeric"
validation: "^[A-Za-z0-9]{64}$"
secret_key:
description: "Secret key used as a base to generate JWT tokens"
algorithm: "alphanumeric"
validation: "^[A-Za-z0-9]{64}$"

View File

@@ -0,0 +1,13 @@
---
- name: "include docker-central-database"
include_role:
name: docker-central-database
- name: "include role nginx-domain-setup for {{application_id}}"
include_role:
name: nginx-domain-setup
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/create-files.yml"

View File

@@ -0,0 +1,27 @@
version: "3"
services:
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
mobilizon:
image: "{{ applications[application_id].images[application_id] }}"
volumes:
- uploads:/var/lib/mobilizon/uploads
# - ./config.exs:/etc/mobilizon/config.exs:ro
ports:
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ mobilizon_exposed_docker_port }}"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:{{ mobilizon_exposed_docker_port }}"]
interval: 30s
timeout: 10s
retries: 3
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
uploads:
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@@ -0,0 +1,129 @@
# Copy this file to .env, then update it with your own settings
######################################################
# Instance configuration #
######################################################
# The name for your instance
MOBILIZON_INSTANCE_NAME={{ applications[application_id].titel }}
# Your domain
MOBILIZON_INSTANCE_HOST={{ domains | get_domain(application_id) }}
# The IP to listen on (defaults to 0.0.0.0)
# MOBILIZON_INSTANCE_LISTEN_IP
# The port to listen on (defaults to 4000). Point your reverse proxy on this port.
MOBILIZON_INSTANCE_PORT={{ mobilizon_exposed_docker_port }}
# Whether registrations are opened or closed. Can be changed in the admin settings UI as well.
# Make sure to moderate actively your instance if registrations are opened.
MOBILIZON_INSTANCE_REGISTRATIONS_OPEN=false
# From which email will the emails be sent
MOBILIZON_INSTANCE_EMAIL={{ users["no-reply"].email }}
# To which email with the replies be sent
MOBILIZON_REPLY_EMAIL={{ users["administrator"].email }}
# The loglevel setting.
# You can find accepted values here: https://hexdocs.pm/logger/Logger.html#module-levels
# Defaults to error
MOBILIZON_LOGLEVEL={% if enable_debug | bool %}debug{% else %}error{% endif %}
######################################################
# Database settings #
######################################################
# The values below will be given to both the PostGIS (PostgreSQL) and Mobilizon containers
# Use the next settings if you plan to use an existing external database
# The Mobilizon Database username. Defaults to $POSTGRES_USER.
# Change if using an external database.
MOBILIZON_DATABASE_USERNAME={{ database_username }}
# The Mobilizon Database password. Defaults to $POSTGRES_PASSWORD.
# Change if using an external database.
MOBILIZON_DATABASE_PASSWORD={{ database_password }}
# The Mobilizon Database name. Defaults to $POSTGRES_DB.
# Change if using an external database.
MOBILIZON_DATABASE_DBNAME={{ database_name }}
# The Mobilizon database host. Useful if using an external database.
MOBILIZON_DATABASE_HOST={{ database_host }}
# The Mobilizon database port. Useful if using an external database.
MOBILIZON_DATABASE_PORT={{ database_port }}
# Whether to use SSL to connect to the Mobilizon database. Useful if using an external database.
# MOBILIZON_DATABASE_SSL=false
######################################################
# Secrets #
######################################################
# A secret key used as a base to generate secrets for encrypting and signing data.
# Make sure it's long enough (~64 characters should be fine)
# You can run `openssl rand -base64 48` to generate such a secret
MOBILIZON_INSTANCE_SECRET_KEY_BASE={{ applications[application_id].secret_key_base }}
# A secret key used as a base to generate JWT tokens
# Make sure it's long enough (~64 characters should be fine)
# You can run `openssl rand -base64 48` to generate such a secret
MOBILIZON_INSTANCE_SECRET_KEY={{ applications[application_id].secret_key }}
######################################################
# Email settings #
######################################################
# The SMTP server
# Defaults to localhost
MOBILIZON_SMTP_SERVER={{system_email.host}}
MOBILIZON_SMTP_PORT={{system_email.port}}
MOBILIZON_SMTP_USERNAME={{ users['no-reply'].email }}
MOBILIZON_SMTP_PASSWORD={{ users['no-reply'].mailu_token }}
# Whether to use SSL for SMTP.
# Boolean
# Defaults to false
MOBILIZON_SMTP_SSL=false
# Whether to use TLS for SMTP.
# Allowed values: always (TLS), never (Clear) and if_available (STARTTLS)
# Make sure to match the port value as well
# Defaults to "if_available"
MOBILIZON_SMTP_TLS={% if system_email.tls %}TLS{% elif system_email.start_tls %}STARTTLS{% else %}Clear{% endif %}
{% if applications | is_feature_enabled('oidc',application_id) %}
####################################
# ▶️ Mobilizon OIDC Configuration
####################################
AUTHENTICATION_STRATEGIES=open_id_connect
# Display name of the OIDC login button
UEBERAUTH_OPENID_CONNECT_DISPLAY_NAME="{{ oidc.button_text }}"
# Use discovery to automatically fetch OIDC provider settings
UEBERAUTH_OPENID_CONNECT_DISCOVERY_DOCUMENT={{ oidc.client.discovery_document }}
# OIDC OAuth2 client credentials
UEBERAUTH_OPENID_CONNECT_CLIENT_ID={{ oidc.client.id }}
UEBERAUTH_OPENID_CONNECT_CLIENT_SECRET={{ oidc.client.secret }}
# Redirect URI for the OIDC callback
UEBERAUTH_OPENID_CONNECT_REDIRECT_URI={{ mobilizon_oidc_callback_url }}
# Scope and response type for OIDC
UEBERAUTH_OPENID_CONNECT_SCOPE=openid email profile
UEBERAUTH_OPENID_CONNECT_RESPONSE_TYPE=code
# Claim/field used to uniquely identify the user
UEBERAUTH_OPENID_CONNECT_UID_FIELD={{ oidc.attributes.username }}
# Optional email verification behavior
UEBERAUTH_OPENID_CONNECT_ASSUME_EMAIL_IS_VERIFIED=true
{% endif %}

View File

@@ -0,0 +1,3 @@
titel: "Mobilizon on {{ primary_domain | upper }}"
images:
mobilizon: "docker.io/framasoft/mobilizon"

View File

@@ -0,0 +1,4 @@
application_id: mobilizon
database_type: "mariadb"
mobilizon_oidc_callback_url: "{{ web_protocol }}://{{ domains | get_domain(application_id) }}/auth/openid_connect/callback"
mobilizon_exposed_docker_port: 4000