Skip to content

Commit

Permalink
rename docker-compose to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
k0va1 committed Dec 13, 2024
1 parent 2e63762 commit 6df7412
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
46 changes: 23 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,61 @@ GROUP=$(shell id -gn)
APPDIR=$(PWD)

install:
docker-compose run --rm runner bundle install
docker-compose run --rm runner yarn install
docker compose run --rm runner bundle install
docker compose run --rm runner yarn install

start:
docker-compose up rails css js sidekiq
docker compose up rails css js sidekiq

clear-jobs:
docker-compose run --rm runner bundle exec rails runner 'Sidekiq.redis { |conn| conn.flushdb }'
docker compose run --rm runner bundle exec rails runner 'Sidekiq.redis { |conn| conn.flushdb }'

db-reset:
docker-compose run --rm runner bundle exec rails db:drop
docker-compose run --rm -e RAILS_ENV=test runner bundle exec rails db:drop
docker compose run --rm runner bundle exec rails db:drop
docker compose run --rm -e RAILS_ENV=test runner bundle exec rails db:drop

db-prepare: db-reset
docker-compose run --rm runner bundle exec rails db:create db:migrate db:seed
docker-compose run --rm -e RAILS_ENV=test runner bundle exec rails db:create db:migrate
docker compose run --rm runner bundle exec rails db:create db:migrate db:seed
docker compose run --rm -e RAILS_ENV=test runner bundle exec rails db:create db:migrate

db-migrate:
docker-compose run --rm runner bundle exec rails db:create db:migrate
docker-compose run --rm -e RAILS_ENV=test runner bundle exec rails db:migrate
docker compose run --rm runner bundle exec rails db:create db:migrate
docker compose run --rm -e RAILS_ENV=test runner bundle exec rails db:migrate

db-open:
docker-compose run --rm runner bundle exec rails db -p
docker compose run --rm runner bundle exec rails db -p

stop:
docker-compose down
docker compose down

test:
docker-compose up -d chrome
docker-compose run --rm -e RAILS_ENV=test runner bundle exec rspec $(filter-out $@,$(MAKECMDGOALS))
docker compose up -d chrome
docker compose run --rm -e RAILS_ENV=test runner bundle exec rspec $(filter-out $@,$(MAKECMDGOALS))

cons:
docker-compose run --rm runner bundle exec rails console
docker compose run --rm runner bundle exec rails console

dive:
docker-compose run --rm runner bash
docker compose run --rm runner bash

lint:
docker-compose run --rm runner bundle exec rake standard
docker-compose run --rm runner bundle exec erblint --lint-all
docker compose run --rm runner bundle exec rake standard
docker compose run --rm runner bundle exec erblint --lint-all

lint-fix:
docker-compose run --rm runner bundle exec rake standard:fix
docker-compose run --rm runner bundle exec erblint --lint-all --auto
docker compose run --rm runner bundle exec rake standard:fix
docker compose run --rm runner bundle exec erblint --lint-all --auto

change-secrets:
docker-compose run --rm runner bundle exec rails credentials:edit --environment=$(filter-out $@,$(MAKECMDGOALS))
docker compose run --rm runner bundle exec rails credentials:edit --environment=$(filter-out $@,$(MAKECMDGOALS))
sudo chown -R $(USER):$(GROUP) .

g:
docker-compose run --rm runner bundle exec rails g $(filter-out $@,$(MAKECMDGOALS))
docker compose run --rm runner bundle exec rails g $(filter-out $@,$(MAKECMDGOALS))
sudo chown -R $(USER):$(GROUP) .

d:
docker-compose run --rm runner bundle exec rails d $(filter-out $@,$(MAKECMDGOALS))
docker compose run --rm runner bundle exec rails d $(filter-out $@,$(MAKECMDGOALS))

%:
@:
4 changes: 2 additions & 2 deletions dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ update_versions() {
}

rebuild_images() {
docker-compose down
docker compose down
docker rmi $(docker images 'lightning-rails' -a -q) -f
docker-compose build runner
docker compose build runner
make install
}

Expand Down

0 comments on commit 6df7412

Please sign in to comment.