mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
APPS-261 Update the WORM test setup
This commit is contained in:
27
scripts/start-compose.sh
Normal file → Executable file
27
scripts/start-compose.sh
Normal file → Executable file
@@ -8,9 +8,8 @@ if [ -z "$DOCKER_COMPOSE_PATH" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Fix uppercase bucket name if set
|
# Fix uppercase bucket name if set
|
||||||
if [ -n "${S3_BUCKET_NAME}" ] ; then
|
#export S3_BUCKET_NAME="${S3_BUCKET_NAME,,}"
|
||||||
export S3_BUCKET_NAME="${S3_BUCKET_NAME,,}"
|
#export S3_BUCKET2_NAME="${S3_BUCKET2_NAME,,}"
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Starting AGS stack in ${DOCKER_COMPOSE_PATH}"
|
echo "Starting AGS stack in ${DOCKER_COMPOSE_PATH}"
|
||||||
|
|
||||||
@@ -23,25 +22,3 @@ else
|
|||||||
echo "Docker Compose failed to start" >&2
|
echo "Docker Compose failed to start" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WAIT_INTERVAL=1
|
|
||||||
COUNTER=0
|
|
||||||
TIMEOUT=300
|
|
||||||
t0=$(date +%s)
|
|
||||||
|
|
||||||
echo "Waiting for alfresco to start"
|
|
||||||
until $(curl --output /dev/null --silent --head --fail http://localhost:8080/alfresco) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
|
|
||||||
printf '.'
|
|
||||||
sleep ${WAIT_INTERVAL}
|
|
||||||
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
|
|
||||||
done
|
|
||||||
|
|
||||||
if (("$COUNTER" < "$TIMEOUT")) ; then
|
|
||||||
t1=$(date +%s)
|
|
||||||
delta=$(( ($t1 - $t0)/60 ))
|
|
||||||
echo "Alfresco Started in $delta minutes"
|
|
||||||
else
|
|
||||||
echo "Waited ${COUNTER} seconds"
|
|
||||||
echo "Alfresco Could not start in time."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
@@ -1,23 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export ALFRESCO_URL="http://localhost:8080/alfresco"
|
||||||
|
|
||||||
WAIT_INTERVAL=1
|
WAIT_INTERVAL=1
|
||||||
COUNTER=0
|
COUNTER=0
|
||||||
TIMEOUT=300
|
TIMEOUT=300
|
||||||
t0=`date +%s`
|
t0=$(date +%s)
|
||||||
|
|
||||||
echo "Waiting for alfresco to start"
|
echo "Waiting for alfresco to start"
|
||||||
until $(curl --output /dev/null --silent --head --fail http://localhost:8080/alfresco) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
|
until $(curl --output /dev/null --silent --head --fail ${ALFRESCO_URL}) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
|
||||||
printf '.'
|
printf '.'
|
||||||
sleep $WAIT_INTERVAL
|
sleep $WAIT_INTERVAL
|
||||||
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
|
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
|
||||||
done
|
done
|
||||||
|
|
||||||
if (("$COUNTER" < "$TIMEOUT")) ; then
|
if (("$COUNTER" < "$TIMEOUT")) ; then
|
||||||
t1=`date +%s`
|
t1=$(date +%s)
|
||||||
delta=$((($t1 - $t0)/60))
|
delta=$((($t1 - $t0)/60))
|
||||||
echo "Alfresco Started in $delta minutes"
|
echo "Alfresco Started in $delta minutes"
|
||||||
else
|
else
|
||||||
echo "Waited $COUNTER seconds"
|
echo "Waited $COUNTER seconds"
|
||||||
echo "Alfresco Could not start in time."
|
echo "Alfresco Could not start in time."
|
||||||
|
echo "All started containers:"
|
||||||
|
docker ps -a
|
||||||
|
ALFCONTAINER=$(docker ps -a | grep _alfresco_1 | awk '{ print $1 }')
|
||||||
|
echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:"
|
||||||
|
docker logs --tail=200 ${ALFCONTAINER}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user