GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - octree-gva/decidim-docker: Docker images for decidim

BranchesTags
Open more actions menu

Latest commit

 

History

456 Commits
456 Commits

Folders and files

NameName
Last commit message
Last commit date
.bundle
.bundle
 
 
.github/workflows
.github/workflows
 
 
config
config
 
 
contrib
contrib
 
 
docker
docker
 
 
lib
lib
 
 
scripts
scripts
 
 
templates
templates
 
 
.dockerignore
.dockerignore
 
 
.env.sample
.env.sample
 
 
.gitignore
.gitignore
 
 
.rubocop.yml
.rubocop.yml
 
 
.ruby-version
.ruby-version
 
 
5min-tutorial.md
5min-tutorial.md
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE
LICENSE
 
 
MAINTAINERS.md
MAINTAINERS.md
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
docker-compose.redhat.yml
docker-compose.redhat.yml
 
 
docker-compose.yml
docker-compose.yml
 
 
good-practices.md
good-practices.md
 
 
package.json
package.json
 
 
quickstart.yml
quickstart.yml
 
 

Repository files navigation

Docker Hub

Decidim

The participatory democracy framework

Free Open-Source participatory democracy, citizen participation and open government for cities and organizations.
Explore the docs »

Join our Matrix.org chat rooms.

Features · Roadmap · Decidim on Docker: Report Bug · Propose New Features · Decidim main repository

Decidim on Docker

On a daily basis, we publish images for five decidim versions, based on various distributions (default is ubuntu:noble). To start with decidim in a breeze, follow our ▶️ 5min tutorial.

Available tags

Tag Description
:latest Unstable development version. (alias for 0.33.0.dev)
:0.32.3 Last version
:0.31.9 Stable version, security and bug fixes only
:0.30.9 Legacy version, previous stable release
:0.29.7 Older legacy

To use other distributions, these are available:

Operating System Decidim v0.33.0.dev Decidim v0.32.3 Decidim v0.31.9 Decidim v0.30.9 Decidim v0.29.7
Ubuntu noble (24.04) :noble-0.33.0.dev :noble-0.32.3 :noble-0.31.9 :noble-0.30.9 :noble-0.29.7
Ubuntu resolute (26.04) :resolute-0.33.0.dev :resolute-0.32.3 :resolute-0.31.9 :resolute-0.30.9 :resolute-0.29.7
Redhat ubi9 (9.9) :ubi9-0.33.0.dev :ubi9-0.32.3 :ubi9-0.31.9 :ubi9-0.30.9 :ubi9-0.29.7
Redhat ubi8 (8.10) :ubi8-0.33.0.dev :ubi8-0.32.3 :ubi8-0.31.9 :ubi8-0.30.9 :ubi8-0.29.7

▶️ 5min tutorial

Ready to mount a Decidim installation locally in 5min? Follow our 5min tutorial to setup Decidim with Docker locally.

Environments configurations

This section is for operators running Decidim with Docker Compose: set these variables on the app service, then docker compose up.

🔐: be sure to read the good practices ;)

Env Name Description Default
DECIDIM_SYSTEM_EMAIL Email use to access /system [email protected]
DECIDIM_SYSTEM_PASSWORD Password use to access /system my_insecure_password
DECIDIM_CRON_ENABLED If cron should be enabled true
SECRET_KEY_BASE 🔐 Secret used to initialize application's key generator my_insecure_password
RAILS_MASTER_KEY 🔐 Used to decrypt credentials file my_insecure_password
RAILS_FORCE_SSL If rails should force SSL false
WEB_CONCURRENCY Puma workers (cluster). 2 lets one worker recycle without taking the app down. 2
RAILS_MIN_THREADS Puma min threads per worker 1
RAILS_MAX_THREADS Puma max threads per worker 5
RAILS_SERVE_STATIC_FILES If rails should be accountable to serve assets false
RAILS_ASSET_HOST If set, define the assets are loaded from (S3?) ``
SIDEKIQ_CONCURRENCY Sidekiq threads. Keep <= DATABASE_MAX_POOL_SIZE, or raise the pool to cover Puma workers × max threads + Sidekiq if they share one Postgres limit. RAILS_MAX_THREADS
DATABASE_MAX_POOL_SIZE Active Record pool. Default covers Puma WEB_CONCURRENCY × RAILS_MAX_THREADS (2 × 5). 10
DATABASE_ADAPTER Active Record adapter (used when config/database.yml reads it) postgresql
DATABASE_URL Optional Postgres URL. Wait-for-db uses Rails DB config (DATABASE_URL, database.yml, or credentials). unset
TZ Timezone used Europe/Madrid
REDIS_URL Redis url for sidekiq redis
DECIDIM_SPAM_DETECTION_BACKEND_RESOURCE Decidim AI resource Bayes adapter. Local compose uses memory so boot does not hit Redis localhost. memory
DECIDIM_SPAM_DETECTION_BACKEND_USER Decidim AI user Bayes adapter. Same as resource for local compose. memory
SMTP_AUTHENTICATION How rails should authenticate to SMTP plain, none
SMTP_USERNAME Username for SMTP [email protected]
SMTP_PASSWORD 🔐 Password for SMTP my_insecure_password
SMTP_ADDRESS SMTP address smtp.iredmail.org
SMTP_DOMAIN SMTP HELO Domain iredmail
SMTP_PORT SMTP address port 587
SMTP_STARTTLS_AUTO If TLS should start automatically enabled
SMTP_VERIFY_MODE How smtp certificates are verified none

All the DECIDIM_ variables are available. See the documentation on default environments variables.

Cron configurations

Cron is configured to run scripts every 15min, 1hour, daily, weekly, monthly. When the times comes, it will execute all scripts present in the /etc/periodic directory. By default, the following scripts are executed:

├── daily
│   └── change_active_steps.sh
│   ├── daily_digest.sh
│   ├── open_data_export.sh
│   └── reminders_all.sh
├── hourly
│   ├── compute_metrics.sh
│   └── delete_download_your_data_files.sh
├── monthly
└── weekly
    ├── clean_registration_forms.sh
    └── weekly_digest.sh

To configure this, you can copy this cron.d directory, change the scripts and map a volume. Carefull, these scripts need permission to be executed, don't forget to chmod +x any new scripts.

# Copy the container directory locally
docker cp decidim:/home/decidim/crontab.d crontab.d

And update your docker-compose:

    container_name: decidim
    image: decidim/decidim:latest
    ports:
      - 3000:3000
    volumes:
      - storage:/home/decidim/storage
+     - ./crontab.d:/etc/decidim/crontab.d
+   environment:
-   environment:    

If you don't use docker image to run your cron and prefer using a schedulder, you can get the commands in the crontab file

Entrypoints

Operators who start this image read this section to see what boot does and how to run migrations.

Boot runs docker/context/docker-entrypoint.d/10_remove_pid and then the process you passed. It does not run Bundler or Rails. Migrations, dependency waits, Deface, and the system admin upsert run when you start them:

docker exec <container> bin/check

bin/check prints one JSON object. A failing check is ERROR and details go to tmp/<UTC>-check.log.

  • 15_wait_for_it: Wait for Redis (REDIS_URL), Postgres/PostGIS (host from Rails DB config, then pg_isready), and Memcached (MEMCACHE_SERVERS).
  • 35_bundle_check: Check that the image gems are installed.
  • 36_db_check: Run rails db:migrate.
  • 39_deface_precompile: Precompile Deface overrides when the gem is installed.
  • 50_upsert-sysadmin: When DECIDIM_SYSTEM_EMAIL and DECIDIM_SYSTEM_PASSWORD are set, update the /system administrator. Both are optional; unset skips this check.

Runtime defaults

Variable Default
WEB_CONCURRENCY 2
VIPS_CONCURRENCY [1, WEB_CONCURRENCY / 3].max, unless you set it
LD_PRELOAD /usr/lib/libjemalloc.so.2
MALLOC_CONF dirty_decay_ms:1000,muzzy_decay_ms:1000,narenas:2,background_thread:false,abort_conf:true

Override any of these in Compose. Unset VIPS_CONCURRENCY to keep the formula.

Command

You can update your docker-compose command to whatever you want. It is common to see one of these:

  • bundle exec rails server -b 0.0.0.0: start a puma server.
  • bundle exec sidekiq: start a sidekiq worker.
  • cron start -f: start cron in forground.
  • sleep infinity: do nothing, and let you exec processes in the container with docker exec decidim.

Contribute

See CONTRIBUTING.md for more informations. PR are Welcome ❤️

Understand how it works

This repository automates publishing Decidim versions as Docker containers and generates documentation for using them.

Decidim Version Management

  • lib/decidim/decidim_version.rb: For a specific Decidim version, retrieve dependencies (Ruby, Node.js, Bundler) versions.
  • lib/docker/docker_image.rb: Match dependencies with the right ruby docker image.
  • lib/docker.rb: Provides Docker-related tasks and helpers.
  • lib/: Other supporting files and modules.

Docker Image Automation

  • bundle exec rake docker:build:ubuntu[version]: Builds Ubuntu based images for a given Decidim version (dev, last, prev, legacy, or old).
  • bundle exec rake docker:build:redhat[version]: Builds Redhat based images for a given Decidim version (dev, last, prev, legacy, or old).

Documentation Generation

  • bundle exec rake docker:docs: Automatically generates documentation from templates/ files.

DockerHub API ruby client

  • yarn dockerhub:update: Download last version of the DockerHub API definition and build a ruby client in contrib/.

Repository Structure

  • contrib/: Supporting files for nginx and docker-hub apis.
  • docker/: Docker context files, old aditional scripts like cron and entrypoints
  • docker/{ubuntu,redhat}/Dockerfile: Dockerfile for each distribution
  • lib/: Contains core classes and modules for version management and Docker image creation.
  • templates/: Holds ERB templates for documentation (README, 5min-tutorial, quickstart.yml) and local compose files (docker-compose.yml, docker-compose.redhat.yml).
  • Rakefile: Define the rake tasks of this repo.

License

This repository is under GNU AFFERO GENERAL PUBLIC LICENSE, V3.

About

Docker images for decidim

decidim.org

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.