From c1cdb44b3b55af83310468b0b115beaa54a7b6f4 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 14 Nov 2024 15:16:50 +0100 Subject: [PATCH] fix: Makefile docker compose commands --- Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 5430ec8..02697ad 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ run: up @make create-seeds up: build - docker-compose -f docker-compose.local.yml up -d + docker compose -f docker-compose.local.yml up -d @make setup-database build: @@ -10,33 +10,33 @@ build: # Stops containers and remove volumes teardown: - docker-compose -f docker-compose.local.yml down -v --rmi all + docker compose -f docker-compose.local.yml down -v --rmi all create-database: - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:create' setup-database: create-database - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:migrate' # Create seeds create-seeds: - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed' + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rake db:schema:load db:seed' # Restore dump restore-dump: bundle exec rake restore_dump shell: - docker-compose -f docker-compose.local.yml exec app /bin/bash + docker compose -f docker-compose.local.yml exec app /bin/bash restart: - docker-compose -f docker-compose.local.yml up -d + docker compose -f docker-compose.local.yml up -d status: - docker-compose -f docker-compose.local.yml ps + docker compose -f docker-compose.local.yml ps logs: - docker-compose -f docker-compose.local.yml logs app + docker compose -f docker-compose.local.yml logs app external: @if [ -z "$(IP)" ]; then \ @@ -44,11 +44,11 @@ external: echo "You can discover your IP as follow : \n > ifconfig | grep netmask | grep -v 127.0.0.1 | awk '{print \$$2}' | tail -n1"; \ exit 1; \ fi - docker-compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rails runner "puts Decidim::Organization.first.update(host: \"$(IP)\")"'; \ + docker compose -f docker-compose.local.yml exec app /bin/bash -c 'DISABLE_DATABASE_ENVIRONMENT_CHECK=1 /usr/local/bundle/bin/bundle exec rails runner "puts Decidim::Organization.first.update(host: \"$(IP)\")"'; \ echo "Decidim organization host updated to $(IP)"; \ echo "App is now accessible at https://$(IP):3000"; rebuild: - docker-compose -f docker-compose.local.yml down + docker compose -f docker-compose.local.yml down docker volume rm decidim-app_shared-volume || true @make up