octree-gva / decidim-in-docker

Proof of concept to run a Decidim Instance on Docker
GNU Affero General Public License v3.0
1 stars 1 forks source link

Decidim Research & Development by Octree

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

Issue | Meta decidim proposal



# Run the POC ## 1. Prepare Data ```bash docker-compose run --rm app rails db:migrate docker-compose run --rm app rails c $ (email, password)=["john@doe.com", "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: ```bash # 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 ```bash 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](https://choosealicense.com/licenses/agpl-3.0/).



# Decidim? [Decidim](https://github.com/decidim/decidim) is a participatory democracy framework, written in Ruby on Rails, originally developed for the Barcelona City government online and offline participation website.

Decidim Website | Decidim Docs | Participatory Governance (meta decidim)
Decidim Community (Matrix+Element.io)