Replace the version-specific Dockerfiles with one staged Dockerfile

This commit is contained in:
Jyri-Petteri Paloposki 2024-07-18 17:12:31 +03:00
parent 5940fe10a6
commit ff5adc5696
19 changed files with 75 additions and 271 deletions

View file

@ -2,7 +2,9 @@
set -e
docker_compose="docker-compose --file test-envs/docker-compose-$1-$2.yml"
export RUBY_VERSION=$1
docker_compose="docker-compose --file test-envs/docker-compose-$2.yml"
function cleanup() {
$docker_compose down

View file

@ -2,13 +2,15 @@
echo "==> Polling DB…"
appdir=$(cd $(dirname "$0")/.. && pwd)
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@
if [ "$DATABASE_TYPE" == "mysql" ]; then
appdir=$(cd $(dirname "$0")/.. && pwd)
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@
for i in {1..60}; do
nc -z -w5 db 3306 && exit
sleep 1
done
for i in {1..60}; do
nc -z -w5 db 3306 && exit
sleep 1
done
echo "Unable to reach database!"
exit 1
echo "Unable to reach database!"
exit 1
fi