Skip to content

Commit

Permalink
changes to latest incantations of docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Nov 6, 2023
1 parent 0bbae6b commit d7f1aaf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
web:
build:
Expand Down
8 changes: 4 additions & 4 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d7f1aaf

Please sign in to comment.