Free Open-Source participatory democracy, citizen participation and open government for cities and organizations
This is the open-source repository for participa-catalunya, based on Decidim.
If you want to develop using Docker you can run docker-compose up
.
It will install ruby deps, run the migrations and start the development server for you.
Then you can open a console with docker-compose run app bash
and continue to the next section.
You will need to do some steps before having the app working properly once you've deployed it:
- Open a Rails console in the server:
bundle exec rails console
- Create a System Admin user:
user = Decidim::System::Admin.new(email: <email>, password: <password>, password_confirmation: <password>)
user.save!
- Visit
<your app url>/system
and login with your system admin credentials - Create a new organization. Check the locales you want to use for that organization, and select a default locale.
- Set the correct default host for the organization, otherwise the app will not work properly. Note that you need to include any subdomain you might be using.
- Fill the rest of the form and submit it.
You're good to go!
Run bin/rake decidim:generate_external_test_app
to generate a dummy application to test both the application and the modules.
Use the test
environment for the current application:
bundle exec rails decidim_courses:install:migrations
bundle exec rails decidim_resource_banks:install:migrations
RAILS_ENV=test bundle exec rails db:migrate
And run tests:
bundle exec rspec spec
TODO: Use a test_app instead of reusing the current application as db/schema.rb
gets modified every time a migration is run for the test environment. And this modifications should not go into version control.