mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-7467 Migrate to Docker Compose V2 (#2560)
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -253,7 +253,7 @@ jobs:
|
|||||||
- name: "Set transformers tag"
|
- name: "Set transformers tag"
|
||||||
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
@@ -318,7 +318,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: Run MariaDB ${{ matrix.version }} database
|
- name: Run MariaDB ${{ matrix.version }} database
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||||
env:
|
env:
|
||||||
MARIADB_VERSION: ${{ matrix.version }}
|
MARIADB_VERSION: ${{ matrix.version }}
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
@@ -381,7 +381,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run MariaDB 10.6 database"
|
- name: "Run MariaDB 10.6 database"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||||
env:
|
env:
|
||||||
MARIADB_VERSION: 10.6
|
MARIADB_VERSION: 10.6
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
@@ -444,7 +444,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run MySQL 8 database"
|
- name: "Run MySQL 8 database"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
||||||
env:
|
env:
|
||||||
MYSQL_VERSION: 8
|
MYSQL_VERSION: 8
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
@@ -506,7 +506,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 13.12 database"
|
- name: "Run PostgreSQL 13.12 database"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
env:
|
env:
|
||||||
POSTGRES_VERSION: 13.12
|
POSTGRES_VERSION: 13.12
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
@@ -568,7 +568,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 14.9 database"
|
- name: "Run PostgreSQL 14.9 database"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
env:
|
env:
|
||||||
POSTGRES_VERSION: 14.9
|
POSTGRES_VERSION: 14.9
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
@@ -630,7 +630,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 15.4 database"
|
- name: "Run PostgreSQL 15.4 database"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
env:
|
env:
|
||||||
POSTGRES_VERSION: 15.4
|
POSTGRES_VERSION: 15.4
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
@@ -690,7 +690,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run ActiveMQ"
|
- name: "Run ActiveMQ"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.13.1
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.13.1
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
@@ -797,7 +797,7 @@ jobs:
|
|||||||
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
|
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
|
||||||
fi
|
fi
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
@@ -960,7 +960,7 @@ jobs:
|
|||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run Postgres 15.4 database"
|
- name: "Run Postgres 15.4 database"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
|
@@ -71,7 +71,7 @@ the _alfresco-internal_ repository:
|
|||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
For additional instructions you can check the official Maven documentation:
|
For additional instructions you can check the official Maven documentation:
|
||||||
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
|
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
|
||||||
@@ -227,7 +227,7 @@ If only the Community or Enterprise images need to be built than the same comman
|
|||||||
|
|
||||||
The Docker images of the Repo can be started independently from Share running the following command in the rm-repo-enterprise or rm-repo-community folder which contains the Docker-compose.yml file:
|
The Docker images of the Repo can be started independently from Share running the following command in the rm-repo-enterprise or rm-repo-community folder which contains the Docker-compose.yml file:
|
||||||
```
|
```
|
||||||
docker-compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
> Be aware of the fact that the Share images can not be started independently from Repo
|
> Be aware of the fact that the Share images can not be started independently from Repo
|
||||||
|
|
||||||
@@ -237,5 +237,5 @@ e.g. In order to start an instance of rm-enterprise-repo and rm-enterprise-share
|
|||||||
|
|
||||||
If you have a license for jRebel then this can be used from the rm-community-share or rm-enterprise-share directories with:
|
If you have a license for jRebel then this can be used from the rm-community-share or rm-enterprise-share directories with:
|
||||||
```
|
```
|
||||||
docker-compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
|
docker compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
|
||||||
```
|
```
|
||||||
|
@@ -4,9 +4,9 @@ set -x
|
|||||||
# Display running containers
|
# Display running containers
|
||||||
docker ps
|
docker ps
|
||||||
|
|
||||||
alfrescoContainerId=$(docker ps -a | grep '_alfresco_' | awk '{print $1}')
|
alfrescoContainerId=$(docker ps -a | grep '-alfresco-' | awk '{print $1}')
|
||||||
shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}')
|
shareContainerId=$(docker ps -a | grep '-share-' | awk '{print $1}')
|
||||||
solrContainerId=$(docker ps -a | grep '_search_' | awk '{print $1}')
|
solrContainerId=$(docker ps -a | grep '-search-' | awk '{print $1}')
|
||||||
|
|
||||||
docker logs $alfrescoContainerId > alfresco.log
|
docker logs $alfrescoContainerId > alfresco.log
|
||||||
if [ -n "$shareContainerId" ]; then
|
if [ -n "$shareContainerId" ]; then
|
||||||
|
@@ -27,8 +27,8 @@ fi
|
|||||||
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
|
# 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" ]
|
if [ "$CLEAN_UP" != "no-clean-up" ]
|
||||||
then
|
then
|
||||||
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
|
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}") rm -f
|
||||||
|
|
||||||
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
|
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
|
||||||
if [ -n "$GENERATED_IMAGES" ]
|
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 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)
|
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 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@@ -10,8 +10,8 @@ fi
|
|||||||
|
|
||||||
echo "Killing ACS stack in ${DOCKER_COMPOSE_PATH}"
|
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
|
# logs for debug
|
||||||
docker-compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
|
docker compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
|
||||||
docker-compose --file ${DOCKER_COMPOSE_PATH} kill
|
docker compose --file ${DOCKER_COMPOSE_PATH} kill
|
||||||
docker-compose --file ${DOCKER_COMPOSE_PATH} rm -fv
|
docker compose --file ${DOCKER_COMPOSE_PATH} rm -fv
|
@@ -51,7 +51,7 @@ else
|
|||||||
echo "Alfresco Could not start in time."
|
echo "Alfresco Could not start in time."
|
||||||
echo "All started containers:"
|
echo "All started containers:"
|
||||||
docker ps -a
|
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:"
|
echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:"
|
||||||
docker logs --tail=200 $ALFCONTAINER
|
docker logs --tail=200 $ALFCONTAINER
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user