-
Install docker: docker engine install
-
Install docker-compose: docker compose install
(Docker Desktop for Windows and Mac includes Compose along with other Docker apps, so Windows and Mac users do not need to install Compose separately.)
-
Clone the project: https://github.com/cybergizer-hq/retrospective
-
Prepare:
docker-compose run runner bundle install
docker-compose run runner yarn install
- Create and setup postgres db:
docker-compose run runner bundle exec rails db:create db:setup
RAILS_ENV=test docker-compose run runner bundle exec rails db:create db:setup
- Add .env file to the root folder
DATABASE_URL=postgres://user:password@postgresql:5432/retrospective_development?max_connections=5
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
In order to skip Alfred login and login with the first seed user put SKIP_ALFRED=true
in your .env file also
-
For Mac M1 users:
Change line
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
to
config.file_watcher = ActiveSupport::FileUpdateChecker
Add to docker-compose.yml
services.app.rails:
platform: linux/amd64
-
Run app:
docker-compose up -d rails
docker-compose up -d webpacker
run Rails console if needed:
docker-compose run runner
- Run specs:
RAILS_ENV=test docker-compose run runner bundle exec rspec