{"id":34113112,"url":"https://github.com/wmo-raf/cap-composer","last_synced_at":"2026-04-01T20:22:09.010Z","repository":{"id":129454116,"uuid":"606584235","full_name":"wmo-raf/cap-composer","owner":"wmo-raf","description":"CAP Alerts composer,  communication and dissemination tool","archived":false,"fork":false,"pushed_at":"2026-03-23T15:19:09.000Z","size":7839,"stargazers_count":12,"open_issues_count":17,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-28T00:39:49.123Z","etag":null,"topics":["alerts","cap-composer","cap-editor","climate-change","common-alerting-protocol","early-warning","early-warning-for-all","early-warning-systems","python","wagtail","warnings","weather"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/cap-composer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wmo-raf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-25T23:21:59.000Z","updated_at":"2026-03-23T15:16:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3e14d1f-54df-454b-9fbf-cafff2dd2cd6","html_url":"https://github.com/wmo-raf/cap-composer","commit_stats":null,"previous_names":["wmo-raf/cap-composer","wmo-raf/alertwise","wmo-raf/cap-editor"],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/wmo-raf/cap-composer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmo-raf%2Fcap-composer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmo-raf%2Fcap-composer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmo-raf%2Fcap-composer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmo-raf%2Fcap-composer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wmo-raf","download_url":"https://codeload.github.com/wmo-raf/cap-composer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmo-raf%2Fcap-composer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alerts","cap-composer","cap-editor","climate-change","common-alerting-protocol","early-warning","early-warning-for-all","early-warning-systems","python","wagtail","warnings","weather"],"created_at":"2025-12-14T19:08:42.939Z","updated_at":"2026-04-01T20:22:08.978Z","avatar_url":"https://github.com/wmo-raf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAPComposer\n\nA [Wagtail](https://wagtail.io/)\nbased [Common Alerting Protocol](https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html) (CAP) Warning\nComposer.\n\nThis is a web-based tool for creating and managing CAP alerts. It is designed to be used by National Meteorological and\nHydrological Services (NMHSs) ,disaster management agencies, and other organizations that have the authority to publish\nand disseminate CAP alerts.\n\nThe **Common Alerting Protocol (CAP)** provides an open, non-proprietary digital message format for all types of alerts\nand notifications.\n\nThis tool formats published warnings into the CAP XML that follows the structure of the schema provided\nat http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html\n\n## 🌟 Features\n\n- Modern user-friendly composer that follows [CAP 1.2](http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html)\n  standard. Built on top of the awesome [Wagtail CMS](https://wagtail.org)\n- Preview a CAP alert as you edit. Save drafts for sharing with colleagues and collaborating\n- Inbuilt CAP validation. The page will not save if you have not input the required data according to CAP standard\n- User-friendly alert area map tool that allows multiple ways of constructing alert geographic areas, while keeping the\n  interface simple\n    - Upload and use your country/territory's administrative boundaries\n    - Draw a polygon\n    - Draw a circle\n    - Selecting predefined areas that you create beforehand for common alert areas\n- Inbuilt publishing workflow using Wagtail's powerful page model, with automated emails to composers and approvers\n- Collaborate with team members using inbuilt comments (similar to how you could do in Word) with automated\n  notifications. Request for changes and approvals\n- Publish realtime notifications/messages to third party integrations using MQTT messaging protocol\n- Predefine a list of hazards types monitored by your institution, with intuitive icons\n  from [OCHA humanitarian icons](https://brand.unocha.org/d/xEPytAUjC3sH/icons#/humanitarian-icons)\n- Extendable to add your custom logic and functionality. The package provides an `abstract` django model that can be\n  inherited for customizations.\n\n## 🛠️ Installation\n\nCAPComposer can be installed in two ways:\n\n1. As a standalone complete Wagtail project\n2. As a set of Wagtail apps that can be integrated into an existing Wagtail project\n\n### Standalone Installation\n\nThis option will set up a Wagtail project together with the complete components required to run CAPComposer. Use this\nwhen\nyou want to have CAPComposer as a standalone project, and not a component in a bigger project.\n\n1. **Clone the repository**\n\n```shell\ngit clone https://github.com/wmo-raf/cap-composer.git\n```\n\n2. **Change into the project directory**\n\n```shell\ncd cap-composer\n```\n\n3. **Copy the sample environment file**\n\n```shell\ncp .env.standalone.sample .env\n```\n\n4. **Edit the `.env` file to set your environment variables.** See\n   the [Standalone Environment Variables](#standalone-environment-variables)\n   below for more information. Use your favourite text editor to edit the file. For example, using `nano`:\n\n```shell\nnano .env\n```\n\n5. **Copy the nginx configuration file**\n\n```shell\ncp nginx/nginx.conf.sample nginx/nginx.conf\n```\n\n6. **Copy the docker-compose file**\n\n```shell\ncp docker-compose.sample.yml docker-compose.yml\n```\n\n7. **Create volumes and set permissions**\n\nCAPComposer uses mounted Docker volumes to store persistent data. The following default directories are used, if not\nchanged in the `.env` file:\n\n- `./docker/volumes/db` for the database\n- `./docker/volumes/static` for static files\n- `./docker/volumes/media` for media files\n- `./docker/volumes/backup` for backups\n\nCreate the directories and set the correct permissions:\n\n```shell\nmkdir -p ./docker/volumes/db ./docker/volumes/static ./docker/volumes/media ./docker/volumes/backup\n\nsudo chown -R \u003cUID\u003e:\u003cGID\u003e ./docker/volumes/db ./docker/volumes/static ./docker/volumes/media ./docker/volumes/backup\n````\n\nReplace `\u003cUID\u003e` and `\u003cGID\u003e` with the user id and group id to be used by the Docker containers.\nThis is set in the `.env` file as `UID` and `GID`. See\nthe [Standalone Environment Variables](#standalone-environment-variables) section for more details.\n\n8. **Build the Docker containers**\n\n```shell\ndocker compose build\n```\n\nThis may take some time to download and build the required Docker images, depending on your internet connection.\n\n9. **Run the Docker containers**\n\n```shell\ndocker compose up -d\n```\n\n10. **Check the logs to ensure everything is running correctly**\n\n```shell\ndocker compose logs -f\n```\n\nIn case of any errors, see the troubleshooting section below for some helpful\ntips [Troubleshooting standalone installation](#troubleshooting-standalone-installation)\n\n11. **Access the application at `http://\u003cip_or_doman\u003e:\u003cCAP_COMPOSER_WEB_PROXY_PORT\u003e`**. Replace `\u003cip_or_domain\u003e` with\n    the\n    IP\n    address or domain name of your server, and `\u003cCAP_COMPOSER_WEB_PROXY_PORT\u003e` with the port set in the `.env` file or\n    `80`\n    if not set.\n\n12. **Create a superuser to access the admin dashboard**\n\n```shell\ndocker compose exec capcomposer capcomposer createsuperuser\n```\n\n`capcomposer` is a shortcut command to `python manage.py` in the Docker container.\n\n13. **Access the admin dashboard at `http://\u003cip_or_doman\u003e:\u003cCAP_COMPOSER_WEB_PROXY_PORT\u003e/\u003cADMIN_URL_PATH\u003e`**. Replace\n    `\u003cADMIN_URL_PATH\u003e` with the path set in the `.env` file or `cap-admin` if not set.\n\n#### Standalone Environment Variables\n\n**Note**: For a quick start, **5 environment variables are required**:\n\n- **SECRET_KEY**\n- **DB_PASSWORD**\n- **REDIS_PASSWORD**\n- **UID**\n- **GID**\n\nThe rest are optional and can be configured as required.\n\n| Variable                             | Description                                                                                                                                                                                                                                     | Required | Default                                        | More Details                                                                                                      |\n|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| SECRET_KEY                           | A unique secret key for securing your Django application. It’s used for encryption and signing. Do not share this key!                                                                                                                          | YES      |                                                |                                                                                                                   |\n| DB_PASSWORD                          | Password for CAPComposer database                                                                                                                                                                                                               | YES      |                                                |                                                                                                                   |\n| DB_USER                              | Username for CAPComposer database                                                                                                                                                                                                               | NO       | cap_composer                                   |                                                                                                                   |\n| DB_NAME                              | Name of the CAPComposer database                                                                                                                                                                                                                | NO       | cap_composer                                   |                                                                                                                   |\n| REDIS_PASSWORD                       | Password for CAPComposer Redis Server                                                                                                                                                                                                           | YES      |                                                |                                                                                                                   |\n| GUNICORN_NUM_OF_WORKERS              | Number of workers for Gunicorn. Recommended value should be `(2 x $num_cores) + 1` . For example, if your server has `4 CPU Cores`, this value should be set to `9`, which is the result of `(2 x 4) + 1 = 9`                                   | NO       | 4                                              |                                                                                                                   |\n| CELERY_NUM_OF_WORKERS                | Number of worker processes for Celery.                                                                                                                                                                                                          | NO       | 4                                              |                                                                                                                   |\n| DEBUG                                | A boolean that turns on/off debug mode. Never deploy a site into production with DEBUG turned on                                                                                                                                                | NO       | False                                          |                                                                                                                   |\n| WAGTAIL_SITE_NAME                    | The human-readable name of your installation which welcomes users upon login to the Wagtail admin.                                                                                                                                              | NO       | CAP Composer                                   |                                                                                                                   |\n| ADMIN_URL_PATH                       | Custom URL path for the admin dashboard. Do not use admin or an easy to guess path. Should be one word and can include an hyphen. DO NOT include any slashes at the start or the end.                                                           | NO       | cap-admin                                      |                                                                                                                   |\n| TIME_ZONE                            | A string representing the time zone for this installation. See the list of time zones. Set this to your country timezone                                                                                                                        | NO       | UTC                                            | [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)                    |\n| ALLOWED_HOSTS                        | A list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configuration                | NO       | 127.0.0.1,localhost                            | [Django Allowed Hosts](https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-ALLOWED_HOSTS)             |\n| CSRF_TRUSTED_ORIGINS                 | A list of trusted origins for unsafe requests (e.g. POST).                                                                                                                                                                                      | NO       | http://127.0.0.1,http://localhost              | [Django CSRF_TRUSTED_ORIGINS](https://docs.djangoproject.com/en/dev/ref/settings/#csrf-trusted-origins)           |\n| DJANGO_ADMINS                        | A list of all the people who get CAPComposer error notifications, in format \"Name \u003cname@example.com\u003e, Another Name \u003canother@example.com\u003e\"                                                                                                       | NO       |                                                |                                                                                                                   |\n| WAGTAILADMIN_BASE_URL                | This is the base URL used by the Wagtail admin site. It is typically used for generating URLs to include in notification emails.                                                                                                                | NO       |                                                |                                                                                                                   |\n| LANGUAGE_CODE                        | The language code for the system. Available codes are `en` for English, `fr` from French, `ar` for Arabic, `am` for Amharic, `es` for Spanish, `sw` for Swahili. Default is `en` if not set                                                     | NO       | en                                             |                                                                                                                   |\n| CAP_CERT_PATH                        | \tPath to the CAP XML signing certificate                                                                                                                                                                                                        | NO       |                                                |                                                                                                                   |\n| CAP_PRIVATE_KEY_PATH                 | Path to the CAP XML signing private key                                                                                                                                                                                                         | NO       |                                                |                                                                                                                   |\n| CAP_SIGNATURE_METHOD                 | Method used for CAP XML signing                                                                                                                                                                                                                 | NO       | ECDSA_SHA256                                   |                                                                                                                   |\n| CAP_MQTT_SECRET_KEY                  | The key used for encryption of MQTT passwords                                                                                                                                                                                                   | NO       |                                                | 44 character URL-safe string. Use tools like [https://fernetkeygen.com](https://fernetkeygen.com) to generate one |\n| CAP_COMPOSER_WEB_PROXY_PORT          | External Docker port for the CAPComposer Nginx web server                                                                                                                                                                                       | NO       | 80                                             |                                                                                                                   |\n| EMAIL_SMTP                           | Enables SMTP for sending emails. If set to a non empty variable, configure the `EMAIL_SMTP_*` variables below                                                                                                                                   | NO       |                                                |                                                                                                                   |\n| EMAIL_SMTP_HOST                      | SMTP server host for sending emails                                                                                                                                                                                                             | NO       |                                                |                                                                                                                   |\n| EMAIL_SMTP_PORT                      | SMTP email port                                                                                                                                                                                                                                 | NO       |                                                |                                                                                                                   |\n| EMAIL_SMTP_USE_TLS                   | Enables TLS encryption for SMTP                                                                                                                                                                                                                 | NO       |                                                |                                                                                                                   |\n| EMAIL_SMTP_USER                      | SMTP username                                                                                                                                                                                                                                   | NO       |                                                |                                                                                                                   |\n| EMAIL_SMTP_PASSWORD                  | SMTP password                                                                                                                                                                                                                                   | NO       |                                                |                                                                                                                   |\n| DEFAULT_FROM_EMAIL                   | Default email address used for sending emails                                                                                                                                                                                                   | NO       |                                                |                                                                                                                   |\n| DB_VOLUME_PATH                       | Path to the mounted volume for the database                                                                                                                                                                                                     | NO       | ./docker/volumes/db                            |                                                                                                                   |\n| BACKUP_VOLUME_PATH                   | Path to the mounted volume for backups                                                                                                                                                                                                          | NO       | ./docker/volumes/backup                        |                                                                                                                   |\n| STATIC_VOLUME_PATH                   | Path to the mounted volume for static files                                                                                                                                                                                                     | NO       | ./docker/volumes/static                        |                                                                                                                   |\n| MEDIA_VOLUME_PATH                    | Path to the mounted volume for media files                                                                                                                                                                                                      | NO       | ./docker/volumes/media                         |                                                                                                                   |\n| CAP_COMPOSER_ENABLE_OTEL             | Enables OpenTelemetry for monitoring and tracing                                                                                                                                                                                                | NO       |                                                |                                                                                                                   |\n| OTEL_EXPORTER_OTLP_ENDPOINT          | Endpoint for OpenTelemetry data export                                                                                                                                                                                                          | NO       |                                                |                                                                                                                   |\n| OTEL_RESOURCE_ATTRIBUTES             | Attributes for OpenTelemetry resources                                                                                                                                                                                                          | NO       |                                                |                                                                                                                   |\n| OTEL_TRACES_SAMPLER                  | Sampling method for OpenTelemetry traces                                                                                                                                                                                                        | NO       | traceidratio                                   |                                                                                                                   |\n| OTEL_TRACES_SAMPLER_ARG              | Specifies the sampling rate or configuration for the chosen sampler. The value depends on the sampler type defined in `OTEL_TRACES_SAMPLER`                                                                                                     | NO       | 0.1                                            |                                                                                                                   |\n| OTEL_PER_MODULE_SAMPLER_OVERRIDES    | Custom sampling rules for specific modules                                                                                                                                                                                                      | NO       | opentelemetry.instrumentation.django=always_on |                                                                                                                   |\n| CAP_COMPOSER_DEPLOYMENT_ENV          | Deployment environment (e.g., production, staging)                                                                                                                                                                                              | NO       | production                                     |                                                                                                                   |\n| UID                                  | User ID for the Docker container. You can find out the current uid and gid values by typing `id` on the terminal                                                                                                                                | NO       | User ID for the Docker container               |                                                                                                                   |U\n| GID                                  | Group ID for the Docker container                                                                                                                                                                                                               | NO       | Group ID for the Docker container              |                                                                                                                   |\n| WAGTAIL_2FA_REQUIRED                 | Enforces Two-Factor Authentication (2FA). When enabled, admin users must setup 2FA to login. Administrators can also enforce 2FA for a specific group                                                                                           | NO       | False                                          |                                                                                                                   |\n| WAGTAIL_NEWSLETTER_MAILCHIMP_API_KEY | When using the default Mailchimp backend, this setting specifies the API key. An API key can be obtained from the [Mailchimp website](https://us1.admin.mailchimp.com/account/api).                                                             | NO       |                                                |                                                                                                                   |\n| WAGTAIL_NEWSLETTER_FROM_NAME         | When sending a newsletter, this value will appear as the email sender’s name.                                                                                                                                                                   | NO       |                                                |                                                                                                                   |\n| WAGTAIL_NEWSLETTER_REPLY_TO          | When sending a newsletter, this value will appear as the email sender’s address. Be sure to configure your email domain to allow the newsletter service to send emails on behalf of this address, otherwise they will likely be marked as spam. | NO       |                                                |                                                                                                                   |\n\n#### Important Notes:\n\n1. **Required Variables**: Ensure `SECRET_KEY`, `DB_PASSWORD`, `REDIS_PASSWORD`, `UID` and `GID` are set, for the\n   minimal\n   configuration.\n2. **Security**: Avoid using default values for sensitive variables like `SECRET_KEY` or `ADMIN_URL_PATH`.\n3. **Debug Mode**: Never set `DEBUG=True` in production.\n4. **Time Zone**: Set `TIME_ZONE` to your local time zone for accurate timestamps.\n5. **SMTP**: Configure email settings to be able to send emails from the system.\n\n#### Troubleshooting standalone installation\n\n1. **Docker containers not starting**: Check the logs for any errors. Run `docker compose logs -f` to see the logs.\n2. **Docker compose file parsing errors**: Ensure the `docker-compose.yml` file is correctly formatted. Check for any\n   syntax errors. Use `docker compose config` to validate the file. Some symbols like dollar signs `($)` or `@` might be\n   the culprit in password variables, especially `DB_PASSWORD`. Check your password and other variables for any special\n   characters that might be causing issues.\n3. **Database/Static/media/backup volume permission errors**: Ensure the `DB_VOLUME_PATH`,`STATIC_VOLUME_PATH`,\n   `MEDIA_VOLUME_PATH`and `BACKUP_VOLUME_PATH` env variables are correctly set. Ensure the user running the CAPComposer\n   containers has the correct permissions to read and write to these volume paths. This is the user set by the `UID` and\n   `GID`environment variables. Set the correct permissions by running `sudo chown -R \u003cUID\u003e:\u003cGID\u003e  ./path/to/volume`, for\n   all the volumes. Replace `\u003cUID\u003e` and `\u003cGID\u003e` with the values set in the `.env` file.\n\n## Legal Disclaimer\n\nSee [LEGAL.md](LEGAL.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmo-raf%2Fcap-composer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwmo-raf%2Fcap-composer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmo-raf%2Fcap-composer/lists"}