ConfBuddies icon indicating copy to clipboard operation
ConfBuddies copied to clipboard

added few helper scripts

Open henrikac opened this issue 3 years ago • 0 comments

This PR adds a few bash scripts that abstracts away a lot of the long docker compose commands, e.g.:

Now, if you want to reset the database, you'll have to write up to three different docker compose commands

  • docker compose stop web
  • docker compose run web bundle exec rake db:reset
  • docker compose start web

but with the new db script you just have to run ./db reset.

The scripts also checks whether docker compose is available, otherwise docker-compose will be used.

New scripts

  • psql => docker compose exec db psql -U postgres ConfBuddies_development
  • rails-c => docker compose run --rm web bin/rails c
  • rspec => docker compose run --rm web bundle exec rspec
  • rubocop => docker compose run --rm web bundle exec rubocop
  • db => This script comes with three commands; setup, migrate and reset. (./db <command>)

henrikac avatar Oct 25 '21 13:10 henrikac