decidim: mirror koopa-decidim setup (9027, docs for /sm showcase)

This commit is contained in:
Hernâni Marques 2026-08-24 08:47:22 +02:00
parent d519fb3c80
commit 9ae0dfa429
No known key found for this signature in database
21 changed files with 998 additions and 2 deletions

22
configs/decidim/entrypoint.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
# Wait for Postgres, migrate, then exec CMD (rails or sidekiq).
set -euo pipefail
export RAILS_ENV="${RAILS_ENV:-production}"
echo "koopa-decidim: waiting for postgres..."
i=0
until bundle exec rails runner 'ActiveRecord::Base.connection.execute("SELECT 1")' >/dev/null 2>&1; do
i=$((i + 1))
if [ "$i" -ge 60 ]; then
echo "koopa-decidim: postgres not ready after ${i} tries" >&2
exit 1
fi
sleep 3
done
echo "koopa-decidim: db:prepare"
bundle exec rails db:prepare
echo "koopa-decidim: exec $*"
exec "$@"