From bf13fd9f90444356903e5b299ec752417a5f537b Mon Sep 17 00:00:00 2001 From: Monique Rio Date: Mon, 6 Nov 2023 13:25:57 -0500 Subject: [PATCH] changes to latest incantations of docker compose --- .github/pre-commit | 4 ++-- README.md | 4 ++-- docker-compose.yml => compose.yml | 2 -- init.sh | 8 ++++---- 4 files changed, 8 insertions(+), 10 deletions(-) rename docker-compose.yml => compose.yml (94%) diff --git a/.github/pre-commit b/.github/pre-commit index 41ee58a..be70354 100755 --- a/.github/pre-commit +++ b/.github/pre-commit @@ -14,12 +14,12 @@ rubyfiles=$(git diff --cached --name-only --diff-filter=ACM "*.rb" "Gemfile" | # Standardize all ruby files echo "๐Ÿงน Formatting staged Ruby files using standardrb ($(echo $rubyfiles | wc -w | awk '{print $1}') total)" -echo "$rubyfiles" | xargs docker-compose run --rm web bundle exec standardrb --fix +echo "$rubyfiles" | xargs docker compose run -T --rm web bundle exec standardrb --fix # Add back the modified/prettified files to staging echo "$rubyfiles" | xargs git add echo "๐Ÿ“‹ Running tests with rspec" -docker-compose run --rm web bundle exec rspec --format progress +docker compose run --rm -T web bundle exec rspec --format progress exit 0 diff --git a/README.md b/README.md index 36c1e75..8f4b98a 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,12 @@ edit .env with the appropriate environment variables start containers ```bash -docker-compose up -d +docker compose up -d ``` Run the tests ``` -docker-compose run web bundle exec rspec +docker compose run web bundle exec rspec ``` In a browser go to http://localhost:4567/callnumber?query=UM1 diff --git a/docker-compose.yml b/compose.yml similarity index 94% rename from docker-compose.yml rename to compose.yml index 65862b8..c07ed1c 100644 --- a/docker-compose.yml +++ b/compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: web: build: diff --git a/init.sh b/init.sh index 29eff30..adb0e12 100755 --- a/init.sh +++ b/init.sh @@ -16,13 +16,13 @@ else fi echo "๐Ÿšข Build docker images" -docker-compose build +docker compose build echo "๐Ÿ“ฆ Installing Gems" -docker-compose run --rm web bundle +docker compose run --rm web bundle echo "๐Ÿ“ฆ Installing Node modules" -docker-compose run --rm web npm install +docker compose run --rm web npm install echo "๐Ÿ“ฆ Building js and css" -docker-compose run --rm web npm run build +docker compose run --rm web npm run build