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)
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
docker-compose up
# Access localhost:3000 (The rails app)
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.
This repository is released under AGPL-V3.
Decidim is a participatory democracy framework, written in Ruby on Rails, originally developed for the Barcelona City government online and offline participation website.