Skip to content

Commit

Permalink
Update for new docker compose
Browse files Browse the repository at this point in the history
Docker compose is no longer available as `docker-compose`.

Update the project to account for this.

https://docs.docker.com/compose/migrate/
  • Loading branch information
mec committed Aug 23, 2024
1 parent 81465b7 commit 5495c2d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Use DotEnv to load our environment variables.

Should Docker and Docker Compose be added to the project the environment
variables will need to be loaded with
`docker-compose up --env-file=.env.development` rather than `docker-compose.env`
`docker compose up --env-file=.env.development` rather than `docker-compose.env`
which is a pattern we have used. Having 2 files for managing environment
variables such as `.env*` and `docker-compose.env*` is undesirable due to the
overhead in keeping these in sync.
Expand Down
2 changes: 1 addition & 1 deletion script/ci/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

set -e

docker-compose -f docker-compose.ci.yml -p app build
docker compose -f docker-compose.ci.yml -p app build
2 changes: 1 addition & 1 deletion script/ci/test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

set -e

docker-compose -f docker-compose.ci.yml \
docker compose -f docker-compose.ci.yml \
-p app \
run --rm test \
script/all/test "$@"
2 changes: 1 addition & 1 deletion script/docker/console
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ set -e
# Enable the running of this script from any subdirectory without moving to root
cd "$(dirname "$0")/../.."

docker-compose run --rm web bundle exec rails console
docker compose run --rm web bundle exec rails console
2 changes: 1 addition & 1 deletion script/docker/server
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd "$(dirname "$0")/../.."

# INFO: To enable debug prompts (with pry or byebug) we first start the process
# in the background and then use attach to create an interactive prompt.
docker-compose up --detach
docker compose up --detach

# TODO: Repace 'rails-template' with application name
docker attach rails-template_web_1
2 changes: 1 addition & 1 deletion script/docker/setup
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd "$(dirname "$0")/../.."

echo "==> Tearing down any previous application state..."
for file in docker-compose.yml docker-compose.test.yml; do
docker-compose -f $file down --rmi local --volumes --remove-orphans
docker compose -f $file down --rmi local --volumes --remove-orphans
done

script/docker/bootstrap --no-docker-cache
2 changes: 1 addition & 1 deletion script/docker/test
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set -e
# Enable the running of this script from any subdirectory without moving to root
cd "$(dirname "$0")/../.."

docker-compose -f docker-compose.test.yml \
docker compose -f docker-compose.test.yml \
run --rm test \
script/all/test "$@"

0 comments on commit 5495c2d

Please sign in to comment.