Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

octree-gva/decidim-in-docker

Repository files navigation

Decidim Research & Development by Octree

Decidim In Docker
A Proof of Concept for using Decidim in Docker from freshly generated app.



Run the POC

1. Prepare Data

docker-compose run --rm app rails db:migrate
docker-compose run --rm app rails c
$ (email, password)=["[email protected]", "secure-password"]
$ Decidim::System::Admin.create!(email: email, password: password, password_confirmation: password)

2. Set Credentials

Environnement RAILS_MASTER_KEY is a critical value, and should never be in a git file. To be secure by default, you need to setup a new master key:

# remove encrypted files
rm -f config/credentials.yml.enc config/master.key
# set up new credentials
docker-compose run --rm app bash -c 'EDITOR="vim" bin/rails credentials:edit'
# type ":wq" and press enter to save and quit the vim editor (you can leave defaults)

Once you have your master key configured, add it to your deployment manually and never commit this file

3. Run the app

docker-compose up
# Access localhost:3000 (The rails app)



How it works

In the docker-compose, you can see:

  • (public net) a NGinx that serve the rails app and assets
    • (private net) A rails app that serve the decidim app
    • (private net) A postgres database

The aims of this docker-compose is to showcase how can we deploy securely an application for production, with a rails app and database in a private network.



License



This repository is released under AGPL-V3.





Decidim?

Decidim is a participatory democracy framework, written in Ruby on Rails, originally developed for the Barcelona City government online and offline participation website.

About

Proof of concept to run a Decidim Instance on Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published