ACS-7467 Migrate to Docker Compose V2 (#2560)

This commit is contained in:
Piotr Żurek
2024-04-03 15:08:10 +02:00
committed by GitHub
parent 1cd8098f52
commit 2bec2bd1c4
6 changed files with 24 additions and 25 deletions

View File

@@ -27,8 +27,8 @@ fi
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
if [ "$CLEAN_UP" != "no-clean-up" ]
then
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
if [ -n "$GENERATED_IMAGES" ]
@@ -42,8 +42,7 @@ echo "Starting ACS stack in ${DOCKER_COMPOSE_PATH}"
export TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
if [ $? -eq 0 ]
then

View File

@@ -10,8 +10,8 @@ fi
echo "Killing ACS stack in ${DOCKER_COMPOSE_PATH}"
docker-compose --file ${DOCKER_COMPOSE_PATH} ps
docker compose --file ${DOCKER_COMPOSE_PATH} ps
# logs for debug
docker-compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
docker-compose --file ${DOCKER_COMPOSE_PATH} kill
docker-compose --file ${DOCKER_COMPOSE_PATH} rm -fv
docker compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
docker compose --file ${DOCKER_COMPOSE_PATH} kill
docker compose --file ${DOCKER_COMPOSE_PATH} rm -fv

View File

@@ -51,7 +51,7 @@ else
echo "Alfresco Could not start in time."
echo "All started containers:"
docker ps -a
ALFCONTAINER=`docker ps -a | grep _alfresco | awk '{ print $1 }'`
ALFCONTAINER=`docker ps -a | grep -alfresco | awk '{ print $1 }'`
echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:"
docker logs --tail=200 $ALFCONTAINER
exit 1