Closed henrikac closed 10 months ago
This PR adds a few bash scripts that abstracts away a lot of the long docker compose commands, e.g.:
docker compose
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.
db
./db reset
The scripts also checks whether docker compose is available, otherwise docker-compose will be used.
docker-compose
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
setup
migrate
reset
./db <command>
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
commandsdocker 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, otherwisedocker-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
andreset
. (./db <command>
)