Docker
You can use Docker to have a local Consul Democracy installation for development if:
You're having troubles having prerequisites installed.
You want to do a quick local installation just to try Consul Democracy or make a demo.
You prefer not to interfere with other rails installations.
Prerequisites
You should have installed Docker and Docker Compose in your machine:
macOS
You can follow the official docker install
Or if you have homebrew and cask installed you can just:
You'll be asked to give Docker app permissions and type your password, then you're set.
Linux
Install Docker:
Install Docker Compose
Windows
Go to the [https://www.docker.com/get-started](Get Started with Docker) page. Under Docker Desktop, select Download for Windows with default options checked, and run. Should take about 5 minutes.
If you encounter the "WSL 2 installation incomplete" error:
Start PowerShell as Administrator
Run
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Run
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Run
wsl --set-default-version 2
Restart your PC
The Docker Enginer will start up. Give it a few minutes. You now have the option of using the docker desktop app (GUI) and
docker
PowerShell/Bash commands
Installation
Clone the repo on your computer and enter the folder:
macOS & Linux
Then lets create our secrets and database config files based on examples:
Then you'll have to build the container with:
Start the database service:
You can now initialize your development DB and populate it with:
Windows
Pending to be completed... Contributions Welcome!
Running local Consul Democracy with Docker
macOS & Linux
Now we can finally run the application with:
And you'll be able to access it at your browser visiting http://localhost:3000
Additionally, if you want to run the rails console just run in another terminal:
To verify the containers are up execute:
Windows
Pending to be completed... Contributions Welcome!
Having trouble?
Run these commands at Consul Democracy's directory, to erase all your previous Consul Democracy's Docker images and containers. Then restart the Docker installation process:
Remove all Consul Democracy images:
Remove all Consul Democracy containers
Verify if there is some container yet:
Case positive, remove each one manually:
Last updated