Skip to content

Commit

Permalink
ACS-8405 Migrate to Docker Compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
dsibilio committed Jul 17, 2024
1 parent 459e3f1 commit dd78068
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,37 +83,37 @@ EXIT /B %ERRORLEVEL%
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d
EXIT /B 0
:start_share
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-share
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-share
EXIT /B 0
:start_acs
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-acs
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-acs
EXIT /B 0
:down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
docker compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:build
call %MVN_EXEC% clean package
EXIT /B 0
:build_share
docker-compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-share
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-share
docker compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-share
docker compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-share
call %MVN_EXEC% clean package -pl ${rootArtifactId}-share,${rootArtifactId}-share-docker
EXIT /B 0
:build_acs
docker-compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-acs
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-acs
docker compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-acs
docker compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-acs
call %MVN_EXEC% clean package -pl ${rootArtifactId}-integration-tests,${rootArtifactId}-platform,${rootArtifactId}-platform-docker
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
docker compose -f "%COMPOSE_FILE_PATH%" logs -f
EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
docker compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:prepare-test
call %MVN_EXEC% verify -DskipTests=true -pl ${rootArtifactId}-platform,${rootArtifactId}-integration-tests,${rootArtifactId}-platform-docker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ start() {
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
}

start_share() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-share
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-share
}

start_acs() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-acs
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-acs
}

down() {
if [ -f "${symbol_dollar}COMPOSE_FILE_PATH" ]; then
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
fi
}

Expand All @@ -41,23 +41,23 @@ build() {
}

build_share() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-share
yes | docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-share
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-share
yes | docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-share
${symbol_dollar}MVN_EXEC clean package -pl ${rootArtifactId}-share,${rootArtifactId}-share-docker
}

build_acs() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-acs
yes | docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-acs
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-acs
yes | docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-acs
${symbol_dollar}MVN_EXEC clean package -pl ${rootArtifactId}-integration-tests,${rootArtifactId}-platform,${rootArtifactId}-platform-docker
}

tail() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
}

tail_all() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
}

prepare_test() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,21 @@ EXIT /B %ERRORLEVEL%
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d
EXIT /B 0
:down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
docker compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:build
call %MVN_EXEC% clean package
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
docker compose -f "%COMPOSE_FILE_PATH%" logs -f
EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
docker compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:prepare_test
call %MVN_EXEC% verify -DskipTests=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ start() {
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
}

down() {
if [ -f "${symbol_dollar}COMPOSE_FILE_PATH" ]; then
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
fi
}

Expand All @@ -33,11 +33,11 @@ build() {
}

tail() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
}

tail_all() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
}

prepare_test() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,29 @@ EXIT /B %ERRORLEVEL%
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d
EXIT /B 0
:start_share
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-share
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d ${rootArtifactId}-share
EXIT /B 0
:down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
docker compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:build
call %MVN_EXEC% clean package
EXIT /B 0
:build_share
docker-compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-share
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-share
docker compose -f "%COMPOSE_FILE_PATH%" kill ${rootArtifactId}-share
docker compose -f "%COMPOSE_FILE_PATH%" rm -f ${rootArtifactId}-share
call %MVN_EXEC% clean package
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
docker compose -f "%COMPOSE_FILE_PATH%" logs -f
EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
docker compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:purge
docker volume rm -f ${rootArtifactId}-acs-volume
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ start() {
docker volume create ${rootArtifactId}-acs-volume
docker volume create ${rootArtifactId}-db-volume
docker volume create ${rootArtifactId}-ass-volume
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d
}

start_share() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-share
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" up --build -d ${rootArtifactId}-share
}

down() {
if [ -f "${symbol_dollar}COMPOSE_FILE_PATH" ]; then
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" down
fi
}

Expand All @@ -37,17 +37,17 @@ build() {
}

build_share() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-share
yes | docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-share
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" kill ${rootArtifactId}-share
yes | docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" rm -f ${rootArtifactId}-share
${symbol_dollar}MVN_EXEC clean package
}

tail() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs -f
}

tail_all() {
docker-compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
docker compose -f "${symbol_dollar}COMPOSE_FILE_PATH" logs --tail="all"
}

case "${symbol_dollar}1" in
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ install it separately after you've installed Docker.
4. Verify the installation of Docker Compose.

```
$ docker-compose -v
docker-compose version 1.22.0, build f46880f
$ docker compose version
Docker Compose version v2.28.1-desktop.1
```

## Generate your project from the archetypes
Expand Down

0 comments on commit dd78068

Please sign in to comment.