diff --git a/.ahoy.yml b/.ahoy.yml index d2bb51377..1e42a7a70 100644 --- a/.ahoy.yml +++ b/.ahoy.yml @@ -6,7 +6,7 @@ commands: usage: Build project. cmd: | docker compose up -d "$@" && - docker compose exec -T test dockerize -wait tcp://mariadb:3306 -timeout 2m; + docker compose exec -T cli dockerize -wait tcp://mariadb:3306 -timeout 2m; down: usage: Delete project. @@ -20,14 +20,14 @@ commands: env $(cat .env | grep -v "#" | xargs) docker buildx bake -f docker-compose.yml --no-cache cli --load env $(cat .env | grep -v "#" | xargs) docker buildx bake -f docker-compose.yml --load docker compose up -d - docker compose exec -T test dockerize -wait tcp://mariadb:3306 -timeout 2m + docker compose exec -T cli dockerize -wait tcp://mariadb:3306 -timeout 2m else ahoy confirm "Are you sure environment variables are correct? Update .env if not." && # Run this if confirm returns true env $(cat .env | grep -v "#" | xargs) docker buildx bake -f docker-compose.yml --no-cache cli --load && env $(cat .env | grep -v "#" | xargs) docker buildx bake -f docker-compose.yml --load && docker compose up -d "$@" && - docker compose exec -T test dockerize -wait tcp://mariadb:3306 -timeout 2m || + docker compose exec -T cli dockerize -wait tcp://mariadb:3306 -timeout 2m || # Run this if confirm returns false echo "OK, nothing to do." fi @@ -136,7 +136,7 @@ commands: cmd: | apk update && apk add --no-cache php php-phar php-json php-openssl php-mbstring php-dom php-tokenizer php-xml php-xmlwriter curl -sS https://getcomposer.org/installer -o composer-setup.php && php composer-setup.php --install-dir=/usr/local/bin --filename=composer && rm composer-setup.php - docker compose exec -T test dockerize -wait tcp://nginx:8080 -timeout 1m + docker compose exec -T cli dockerize -wait tcp://nginx:8080 -timeout 1m docker compose exec -T nginx nginx -t composer validate --strict -d .docker/images/nginx/tests composer install -d .docker/images/nginx/tests diff --git a/.docker/Dockerfile.govcms b/.docker/Dockerfile.govcms index 2e05c0851..c2cbf5429 100644 --- a/.docker/Dockerfile.govcms +++ b/.docker/Dockerfile.govcms @@ -28,6 +28,14 @@ RUN --mount=type=secret,id=composer-auth,dst=/app/auth.json /usr/local/bin/compo RUN --mount=type=secret,id=composer-auth,dst=/app/auth.json /usr/local/bin/composer update --no-dev -d /app RUN --mount=type=secret,id=composer-auth,dst=/app/auth.json /usr/local/bin/composer clearcache +# Set an environment variable for Dockerize version +ENV DOCKERIZE_VERSION v0.6.1 + +# Download Dockerize, extract, and install it +RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ + && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ + && rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz + # Add bash aliases to assist with full path executables. COPY .docker/images/govcms/entrypoints /lagoon/entrypoints/ diff --git a/.docker/Dockerfile.test b/.docker/Dockerfile.test index 5ee3f16ce..e5e84297f 100644 --- a/.docker/Dockerfile.test +++ b/.docker/Dockerfile.test @@ -11,6 +11,7 @@ FROM uselagoon/php-8.3-cli-drupal:${LAGOON_IMAGE_VERSION} # Set an environment variable for Dockerize version ENV DOCKERIZE_VERSION v0.6.1 +# @TODO - Remove this after https://github.com/govCMS/scaffold/pull/117/ is merged and released. # Download Dockerize, extract, and install it RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \