Free Open-Source participatory democracy, citizen participation and open government for cities and organizations
This is the open-source repository for SGE+. SGE+ is based on Decidim.
bundle install
nvm use 22.14.0
npm install
bin/rails db:create db:schema:load
bin/rails db:seed
bin/devRun bin/rake decidim:generate_external_test_app to generate a dummy application to test both the application and the modules.
Require missing factories in spec/factories.rb
Add require "spec_helper" to your specs and execute them from the root directory, i.e.:
bundle exec rspec --backtraceThe app reports Puma stats and a custom Solid Queue collector (see
config/puma.rb and lib/prometheus_exporter/server/solid_queue_collector.rb)
through the prometheus_exporter
gem. To inspect these metrics locally:
With the app running (bin/dev), start the standalone exporter in a separate
terminal:
bundle exec prometheus_exporter -a lib/prometheus_exporter/server/solid_queue_collector.rbThis exposes the raw metrics at http://localhost:9394/metrics (check with
curl http://localhost:9394/metrics).
Use the sample scrape config at docker/prometheus/prometheus.yml:
docker run --rm --name prometheus_local \
--network host \
-v "$(pwd)/docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro" \
prom/prometheus:latestPrometheus will be available at http://localhost:9090. From the "Graph" tab
you can query metrics such as solid_queue_ready_jobs, solid_queue_failed_jobs
or the Puma pool stats.
--network hostonly works on Linux. On Docker Desktop (Mac/Windows), drop that flag, add-p 9090:9090, and change the target indocker/prometheus/prometheus.ymltohost.docker.internal:9394.