Decidim - Octree Participatory democracy on a robust and open source solution

Octree | Contact Us | Our Blog (FR)

Decidim | Decidim Docs | Participatory Governance (meta decidim)

Decidim Community (Matrix+Element.io)

Lausanne Participe — Une plateforme de participation pour imaginer et réaliser ensemble Voca – Open-Source SaaS platform for Decidim

Decidim: Use External Newsletter

This module removes newsletters from Decidim, to use external newsletters, sponsored by the Lausanne Participe platform.

Why it's needed?

Participation is wide, and can use many digital tools. To have a broader newsletter, that includes the whole participation space of the city we need:

  • Subscribers to the newsletters don't need an account to subscribe, just an email
  • The newsletter sending need to be managed by a restricted group of persons.
  • The form to register to the newsletter needs to be included in every digital spaces involving participation.

Usage

This gem removes functionnalities, and add very little to the instance. The database is not afftected, but we give some Rake Tasks to comply to RGPD and clean previously installed Decidim.

Installation

Add this line to your application's Gemfile:

gem "decidim-external_newsletter"

And then execute:

bundle

Testing

bundle exec rake test_app

Local development

First, you need to run an empty database with a decidim dev container which runs nothing.

docker-compose down -v --remove-orphans
docker-compose up -d

Once created, you access the decidim container

# Get the id of the decidim dev container
docker ps --format {{.ID}} --filter=label=org.label-schema.name=dec
idim
# f16bd5314386
docker exec -it f16bd5314386 bash

You are now in bash, run manually docker-entrypoint.

# Will check your environment and do migrations if needed
docker-entrypoint

You are now ready to use your container in the way you want for development:

  • Run a rails server: bundle exec rails s -b 0.0.0.0
  • Have live-reload on your assets: bin/webpack-dev-server
  • Execute tasks, like bundle exec rails g migration AddSomeColumn
  • etc. bundle exec rails s -b 0.0.0.0 # rails server bin/webpack-dev-server etc.

To stop everything, uses:

  • docker-compose down to stop the containers
  • docker-compose down -v to stop the containers and remove all previously saved data.

Debugging

To debug something on the container:

  1. Ensure decidim-app is running ```bash docker ps --all # CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES # 511c5048485c decidim-module-external_newsletter-decidim-app "sleep infinity" 28 minutes ago Up 28 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp, 0.0.0.0:3035->3035/tcp, :::3035->3035/tcp decidim-external_newsletter-app # a08934c17b68 postgres:14-alpine "docker-entrypoint.s…" 28 minutes ago Up 28 minutes (healthy) 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp decidim-module-external_newsletter-pg-1

2. Run `docker exec -it decidim-app bash`
3. Run
    - `tail -f $ROOT/log/development.log` to **access logs**
    - `bundle exec rails restart` to **restart rails server AND keeps webpacker running**
    - `cd $ROOT` to access the `development_app`
    - `cd $ROOT/../decidim_module_external_newsletter` to access the module directory

## Contributing

See [Decidim](https://github.com/decidim/decidim).

## License

This engine is distributed under the [GNU AFFERO GENERAL PUBLIC LICENSE](LICENSE-AGPLv3.txt)

<br /><br />
<p align="center">
    <img src="https://raw.githubusercontent.com/octree-gva/meta/main/decidim/static/octree_and_decidim.png" height="90" alt="Decidim Installation by Octree" />
</p>