### Start Mobilizon Service with runit Source: https://github.com/kaihuri/mobilizon/blob/main/support/runit/README.md Starts the Mobilizon service managed by runit in user mode. Ensure `runsvdir` is running in user mode. ```bash sv start ~/sv/mobilizon ``` -------------------------------- ### Reattach Media Files to Their Entity (Source Install) Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Run this command in a source installation to reattach media files to their corresponding events and posts. This ensures that media files are correctly associated with content before running cleanup tasks. ```bash MIX_ENV=prod mix mobilizon.maintenance.fix_unattached_media_in_body ``` -------------------------------- ### Refresh Remote Profiles to Save Avatars Locally (Source Install) Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md In a source installation, use this command to refresh all remote actors, saving their avatars and banners locally. This replaces the previous proxied and cached approach. ```bash MIX_ENV=prod mix mobilizon.actors.refresh --all ``` -------------------------------- ### Update geographic timezone data (Source install) Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md Update geographic timezone data from source for Mobilizon installed from source. This process requires approximately 1GB of memory. Ensure the 'mobilizon' user has write permissions to the specified directory. ```shell sudo -u mobilizon mkdir /var/lib/mobilizon/timezones sudo -u mobilizon mix mobilizon.tz_world.update ``` -------------------------------- ### Update geographic timezone data (Release install - raw) Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md Download and process raw geographic timezone data from Github for Mobilizon. This requires approximately 1GB of memory and 700MB of disk space. Ensure the 'mobilizon' user has write permissions to the specified directory. ```shell sudo -u mobilizon mkdir /var/lib/mobilizon/timezones sudo -u mobilizon ./bin/mobilizon_ctl tz_world.update ``` -------------------------------- ### Update geographic timezone data (Release install) Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md Download pre-processed geographic timezone data for Mobilizon. This requires approximately 700MB of disk space. Ensure the 'mobilizon' user has write permissions to the specified directory. ```shell sudo -u mobilizon mkdir /var/lib/mobilizon/timezones sudo -u mobilizon curl -L 'https://packages.mobilizon.org/tz_world/timezones-geodata.dets' -o /var/lib/mobilizon/timezones/timezones-geodata.dets ``` -------------------------------- ### Reattach Media Files to Their Entity (Docker) Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Execute this command within a Docker Compose setup to reattach media files to their associated events and posts. This is a crucial step before cleaning up unattached media. ```bash docker-compose exec mobilizon mobilizon_ctl maintenance.fix_unattached_media_in_body ``` -------------------------------- ### Configure timezone data directory (Release install) Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md Specify a custom directory for the geographic timezone data if not using the default location. This configuration is applied within the Elixir application. ```elixir config :tz_world, data_dir: "/some/place" ``` -------------------------------- ### Populate Search Index for Existing Events Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Run this command to populate the search index for existing events. Ensure the environment is set to 'prod'. ```bash mix mobilizon.setup_search ``` -------------------------------- ### Configure Local Uploads Directory Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md To maintain the previous 'uploads/' directory for local uploads, add this configuration to 'config/runtime.exs'. Otherwise, it defaults to '/var/lib/mobilizon/uploads'. ```elixir config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, uploads: "uploads" ``` -------------------------------- ### Manage Users and View Actors Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md These mix commands are used to manage users and view actors. Refer to their respective documentation for detailed usage. ```bash mix mobilizon.users ``` ```bash mix mobilizon.actors ``` -------------------------------- ### Configure GeoIP Database Directory Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md To use the previous 'priv/data/GeoLite2-City.mmdb' directory for the GeoIP database, add this configuration to 'config/runtime.exs'. The default is '/var/lib/mobilizon/geo/GeoLite2-City.mmdb'. ```elixir config :geolix, databases: [ %{ id: :city, adapter: Geolix.Adapter.MMDB2, source: "priv/data/GeoLite2-City.mmdb" } ] ``` -------------------------------- ### Move Participant Stats to Event Table Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Execute this command to move participant statistics to the event table for existing events. Ensure the environment is set to 'prod'. ```bash mix mobilizon.move_participant_stats ``` -------------------------------- ### Show User Details Task Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Displays details for a specific user. Refer to the documentation for managing users. ```elixir mix mobilizon.users.show ``` -------------------------------- ### Clean Orphan Media Files (Dry Run) Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md This command helps identify orphan media files that can be deleted. Use the `--dry-run` option to preview which files would be removed without actually deleting them. Ensure all media files are reattached first. ```bash mix mobilizon.maintenance.clean_orphan_media --dry-run ``` -------------------------------- ### Recompile Mime Library Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Recompile the 'mime' library before recompiling Mobilizon when upgrading to version 1.0.0-rc.1. This ensures compatibility with the updated MIME type handling for ActivityPub requests. ```bash MIX_ENV=prod mix deps.clean mime --build ``` -------------------------------- ### Manually Clean Unconfirmed Users Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Execute this mix task to manually clean up unconfirmed users and their associated initial profiles. This task is useful for maintaining a clean user database. ```bash mix mobilizon.maintenance.clean_unconfirmed_users ``` -------------------------------- ### Create exports folder for CSV Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md Create the default directory for CSV exports. This folder is used for temporary storage and is cleaned hourly. The path can be configured separately. ```shell sudo -u mobilizon mkdir -p /var/lib/mobilizon/uploads/exports/csv ``` -------------------------------- ### Refresh Remote Profiles to Save Avatars Locally (Docker) Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Run this command in a Docker Compose environment to refresh remote actors and store their profile media (avatars and banners) locally, improving performance and reliability. ```bash docker-compose exec mobilizon mobilizon_ctl actors.refresh --all ``` -------------------------------- ### Update Mailer Configuration for Swoosh Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md This snippet shows the configuration changes required in the `config :mobilizon, Mobilizon.Web.Email.Mailer` section to switch from Bamboo.SMTPAdapter to Swoosh.Adapters.SMTP. It highlights renaming keys and updating default values for username and password. ```diff config :mobilizon, Mobilizon.Web.Email.Mailer, - adapter: Bamboo.SMTPAdapter, + adapter: Swoosh.Adapters.SMTP, - server: "localhost", + relay: "localhost", - hostname: "localhost", # usually 25, 465 or 587 port: 25, - username: nil, + username: "", - password: nil, + password: "", # can be `:always` or `:never` tls: :if_available, allowed_tls_versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"], retries: 1, # can be `true` no_mx_lookups: false, # can be `:always`. If your smtp relay requires authentication set it to `:always`. auth: :if_available ``` -------------------------------- ### Stop Mobilizon Service with runit Source: https://github.com/kaihuri/mobilizon/blob/main/support/runit/README.md Stops the Mobilizon service managed by runit in user mode. Ensure `runsvdir` is running in user mode. ```bash sv stop ~/sv/mobilizon ``` -------------------------------- ### Remove server: true from Endpoint Configuration Source: https://github.com/kaihuri/mobilizon/blob/main/UPGRADE.md When migrating to releases, remove the 'server: true' option from the Mobilizon.Web.Endpoint configuration in your production secrets file. ```diff config :mobilizon, Mobilizon.Web.Endpoint, - server: true, ``` -------------------------------- ### Delete User Task Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md Completely deletes a user. The `--keep_email` option can be used to prevent re-registration with the same email. Refer to the documentation for managing users. ```elixir mix mobilizon.users.delete ``` -------------------------------- ### Sanitize Event Title for XSS Prevention Source: https://github.com/kaihuri/mobilizon/blob/main/CHANGELOG.md This security measure involves sanitizing the event title to prevent Cross-Site Scripting (XSS) attacks. ```elixir Sanitize event title to avoid XSS ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.