Decidim is a participatory democracy framework, written in Ruby on Rails, originally developed for the Barcelona City government online and offline participation website. Installing these libraries will provide you a generator and gems to help you develop web applications like the ones found on example applications or like our demo application.
Setting up the development environment of [Decidim] (https://github.com/decidim/decidim) with Docker
- For Linux users, we need you to install Docker engine and Docker compose. Make sure you have Docker compose version 1.6 or higher by executing
$ docker-compose version
- For PC and Mac users we need you to install Docker toolbox for Mac and Windows and use Docker Machine to create a virtual machine to run your Docker containers. Once your machine is created and you have connected your shell to this new machine, you're ready to run Docker commands on this host. If you're using Linux you can skip to the next step.
$ git clone
$ cd decidim_base
$ mkdir -p pg-data redis-data
$ docker-compose build
$ docker-compose up -d
$ docker-compose run decidim_app rake db:migrate
$ docker ps (find the container id or container name)
$ docker exec -it <containerid or containername> bash
$ rails console
$ paste the below code in console and presee enter
Decidim::System::Admin.create!(
email: "[email protected]",
password: "decidim123456",
password_confirmation: "decidim123456"
)
$ docker-compose decidim_app restart
$ docker-compose run decidim_app run db:migrate
If you are using Docker Machine, run this command to get your current Docker host's IP:
$ docker-machine ip <your_docker_machine_name>
After you create a development app (bundle exec rake development_app
):
cd decidim_base
docker-compose up -d
- Go to 'https://localhost:3000' Note: You will have to accept the cert warning Optionally, you can log in as: [email protected] | decidim123456
Also, if you want to verify yourself against the default authorization handler use a document number ended with "X".
After you create a development app (bundle exec rake development_app
):
cd decidim_base
docker-compose up -d
- Go to 'https://localhost:3000/user/sign_in'
- Login data: [email protected] | decidim123456 Note: You will have to accept the cert warning
- Go to 'https://localhost:3000/admin'
- Login data: [email protected] | decidim123456 Note: You will have to accept the cert warning
Since Decidim is a ruby gem, you can check out the dependent repositories to see how many applications are on the wild or tests that other developers have made. Here's a partial list with some of the projects that have used Decidim:
- Demo
- Decidim Barcelona - View code
- L'H ON Participa - View code
- Decidim Terrassa - View code
- Decidim Sabadell - View code
- Decidim Gavà - View code
- Decidim Sant Cugat - View code
- Vilanova Participa - View code
- Erabaki Pamplona - View code
- Decidim Mataró - View code
- Commission Nationale du Débat Public (France)
- MetaDecidim - View Code