A containerized, real-time polling app built with Ruby on Rails 8, Hotwire, Bootstrap, and PostgreSQL.
These instructions will get your development environment set up and running in Docker.
Before we begin, clone the repo and enter the root folder. There, create the .env file with the following env vars, and add your values - or just copy the ones provided below:
DATABASE_USERNAME=voting_b2b_admin
DATABASE_PASSWORD=b2b123123
DATABASE_HOST=localhost
Note: Ensure Docker is installed and running before proceeding.
docker compose up --buildThis command will:
-
Build the web container (your Rails app)
-
Start the db container (PostgreSQL)
-
Mount your local files for live code reload
Once the containers are up, open a new terminal tab and run:
docker compose exec web rails db:create db:migrate db:seed
docker compose exec web bundle exec rake assets:precompile
This will create and seed the database, and compile the assets.
Open your browser and go to:
http://localhost:3000
To run the tests:
rspec