Docker
Last updated
Last updated
Docker and Docker Compose should be installed on your machine. The installation process depends on your operating system.
You can follow the .
Or, if you have installed, you can just:
You'll be asked to give permissions to the Docker app and type your password; then, you're set.
Install Docker and Docker Compose. For example, in Ubuntu 22.04:
The official Docker documentation includes a page with instructions to . From there, download Docker Desktop for Windows and execute it.
Clone the repo on your computer and enter the folder:
Then create the secrets and database config files based on the example files:
Then build the image with:
And create the containers:
You can now initialize your development DB and populate it with:
Now we can finally run the application with:
Additionally, if you'd like to run the rails console:
To verify the containers are up execute:
You should see an output similar to this:
First, setup the database for the test environment:
Then you can run tests using RSpec. For example, to run the tests for the proposal model:
System tests also work out of the box, although they might fail the first time while the tool running the tests downloads the right version of Chromedriver (which is needed to run them), and only "headless" mode (with a browser running in the background) is supported, which is the mode you'd probably use more than 95% of the time anyway. For example, to run the tests for the homepage:
Remove all Consul Democracy images:
Remove all Consul Democracy containers:
Check whether there are still containers left:
In case there are, remove each one manually:
And you'll be able to access it by opening your browser and visiting .
Consul Democracy includes more than 6000 tests checking the way the application behaves. While we recommend you to use a continuous integration system to run the whole test suite and verify that the latest changes don't break anything, while developing you probably want to run the tests related to the code you're working on.
Run these commands inside Consul Democracy's directory, to erase all your previous Consul Democracy's Docker images and containers. Then start the Docker once again.