/events

App for publishing events built with Ruby/Ruby on Rails

Primary LanguageRuby

Events

Description

Event scheduler app built with Ruby and Ruby on Rails.
You schedule events by creating event cards and they become active (red colored) on due time.
App consists of 4 Docker containers: 1 - rails app, 2 - sidekiq worker,
3 - redis database, 4 - postgres database.
The volume binding is used in development to map container files and folders to host machine.
Volume binding makes it possible to exclude files from mapping.
There are separate Docker and Docker compose files for development and test environments.

Tech stack

Docker
Docker compose
Ruby
Ruby on Rails
Sidekiq
Postgres
Redis

How to make it work

For development environment:
cd to project root folder.
We have 4 containers in development environment.
Create images + create and run containers:
docker-compose -f ./docker-compose-dev.yml up
Stop and remove containers:
docker-compose -f ./docker-compose-dev.yml down
Rebuild images + create and run containers:
docker-compose -f ./docker-compose-dev.yml up --build
List services:
docker-compose -f ./docker-compose-dev.yml ps
App runs on localhost:3000
Sidekiq dashboard is on localhost:3000/sidekiq/

For test environment:
cd to project root folder.
We have 4 containers in test environment.
Create images + create and run containers:
docker-compose -f ./docker-compose-test.yml up
Stop and remove containers:
docker-compose -f ./docker-compose-test.yml down
Rebuild images + create and run containers:
docker-compose -f ./docker-compose-test.yml up --build
List services:
docker-compose -f ./docker-compose-test.yml ps
Container where tests are run may need to restart few times
in order to connect to postgres.
Don't forget to stop all the services after running tests.