Skip to content

Commit

Permalink
Update docker command to docker-compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Aug 9, 2024
1 parent 15e534c commit 335aa71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ task startMongodbServer() {
println("Starting mongodb server...")
exec {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker-compose -f tests/resources/docker/docker-compose.yml up && exit %%ERRORLEVEL%%"
commandLine 'cmd', '/c', "docker compose -f tests/resources/docker/docker-compose.yml up && exit %%ERRORLEVEL%%"
} else {
commandLine 'sh', '-c', "docker-compose -f tests/resources/docker/docker-compose.yml up -d"
commandLine 'sh', '-c', "docker compose -f tests/resources/docker/docker-compose.yml up -d"
}
}
}
Expand All @@ -108,9 +108,9 @@ task stopMongodbServer() {
println("Stopping mongodb server...")
exec {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker-compose -f tests/resources/docker/docker-compose.yml down && exit %%ERRORLEVEL%%"
commandLine 'cmd', '/c', "docker compose -f tests/resources/docker/docker-compose.yml down && exit %%ERRORLEVEL%%"
} else {
commandLine 'sh', '-c', "docker-compose -f tests/resources/docker/docker-compose.yml down"
commandLine 'sh', '-c', "docker compose -f tests/resources/docker/docker-compose.yml down"
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions ballerina/tests/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
mongo-no-auth:
image: mongo:4.2
Expand Down
2 changes: 0 additions & 2 deletions examples/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

services:
mongodb:
image: mongo:4.2
Expand Down

0 comments on commit 335aa71

Please sign in to comment.