Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
/ decidim-staging Public archive

Demo application to try Codegram's unreleased features of Decidim

Notifications You must be signed in to change notification settings

codegram/decidim-staging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

decidim_staging

Citizen Participation and Open Government application.

This is the open-source repository for decidim_staging, based on Decidim. This app is used to preview the latest staging branch of Codegram's Decidim fork.

Deploy

Review Apps

This application uses Heroku Review Apps to check new features individually and in isolation. In order to create a Review App:

  1. Go to the Actions tab
  2. Select Review app creator and click on Run workflow button
  3. Fill in the Decidim branch name with the name of your feature branch
  4. Optional: add the Decidim issue number
  5. Click Run workflow (This will trigger a deploy of a new Review App. You can check it in the Heroku dashboard. Also, when the deployment is finished, it will appear in the PR in this repo.)
  6. When the feature is reviewed close the PR (DO NOT MERGE IT!)

Updating the app

Using the "Review App creator" can give some problems with migrations. You can use the "App updater" workflow to update and existing Review App with the last changes from the Decidim branch. In order to do it:

  1. Go to the Actions tab
  2. Select App updater and click on Run workflow button
  3. Fill in the Decidim branch name with the name of your feature branch
  4. Click Run workflow

Also, there's an alternative: use bin/decidim_upgrade (check master branch if your branch doesn't have it). The downside is that it currently needs to be executed manually (clone the repo, checkout to your branch, run the command and commit&push the changes) but it won't give any problems with migrations.

Reseeding the DB

If you need to re-seed the database:

  1. Install the Heroku CLI
  2. Wait until the app has been successfully deployed
  3. heroku pg:reset --app decidim-staging-pr-<your PR ID>
  4. heroku run rails db:migrate --app decidim-staging-pr-<your PR ID>
  5. heroku run rails db:seed --app decidim-staging-pr-<your PR ID>

Recreating the whole DB

If you need to recreate the whole database (to remove or fix migrations):

  1. rm db/schema.rb
  2. rm db/migrate/*
  3. rbenv exec bundle exec rake db:reset
  4. rbenv exec bundle exec rake decidim:upgrade
  5. rbenv exec bundle exec rake db:migrate
  6. heroku pg:reset -a decidim-staging-pr-<your PR ID>
  7. Push your changes to the decidim-staging repository
  8. Wait until the app has been successfully deployed
  9. heroku run rails db:seed -a decidim-staging-pr-<your PR ID>

About

Demo application to try Codegram's unreleased features of Decidim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published