diff --git a/Dockerfile b/Dockerfile index dd269858e..59d20bd95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,5 +38,7 @@ RUN \ COMPOSER_MEMORY_LIMIT=-1 COMPOSER_DISCARD_CHANGES=true composer install --no-interaction --no-progress --prefer-dist && \ composer clearcache +HEALTHCHECK --start-period=3m --retries=10 --timeout=5s --interval=15s CMD curl -o /dev/null -s -H "Host:$( echo $DRUPAL_DEFAULT_SITE_URL | sed s,^.*/,, )" http://localhost:80/ || exit 1 + # /init process must be run as root: USER root diff --git a/codebase/config/sync/field.storage.node.field_alternative_title.yml b/codebase/config/sync/field.storage.node.field_alternative_title.yml index 0b914be6b..c4fc71edf 100644 --- a/codebase/config/sync/field.storage.node.field_alternative_title.yml +++ b/codebase/config/sync/field.storage.node.field_alternative_title.yml @@ -15,7 +15,7 @@ field_name: field_alternative_title entity_type: node type: language_value_pair settings: - max_length: '500' + max_length: '5000' is_ascii: false case_sensitive: false target_type: taxonomy_term diff --git a/idc.Makefile b/idc.Makefile index ebb867e6c..e831394b7 100644 --- a/idc.Makefile +++ b/idc.Makefile @@ -182,12 +182,33 @@ start: .SILENT: _docker-up-and-wait _docker-up-and-wait: docker-compose up -d - sleep 5 + containerId="" ; \ + while [ -z "$$containerId" ] ; do \ + echo "(still) waiting for Drupal container to appear" ; \ + sleep 2; \ + containerId=$$( docker-compose ps -q drupal ) ; \ + done && echo "containerId='$$containerId'" + # composer config can move forward since container is available: if [ "${GH_TOKEN}" ]; then \ echo "Installing github token"; \ - docker-compose exec -T drupal bash -lc "composer config -g github-oauth.github.com ${GH_TOKEN}" && echo '' ; \ - fi; - docker-compose exec -T drupal /bin/sh -c "while true ; do echo \"Waiting for Drupal to start ...\" ; if [ -d \"/var/run/s6/services/nginx\" ] ; then s6-svwait -u /var/run/s6/services/nginx && exit 0 ; else sleep 5 ; fi done" + docker-compose exec -T drupal bash -lc "composer config -g github-oauth.github.com ${GH_TOKEN}" ; \ + else \ + echo "No github token provided" ; \ + fi + # new block: + containerId=$$( docker-compose ps -q drupal ) ; \ + echo "Drupal container ID: '$$containerId'" ; \ + containerName=$$(docker inspect -f '{{.Name}}' $$(docker-compose ps -q drupal) | cut -c2-) ; \ + echo "Looking into run-state of found-container '$$containerName'" ; \ + if [ -n "$$containerName" ] ; then \ + runState="" ; \ + while [ "true" != "$$runState" ] ; do \ + sleep 5 ; \ + runState=$$(docker inspect -f {{.State.Running}} "$$containerName") ; \ + echo "Waiting for Drupal to start ... current state: $$runState" ; \ + done && \ + echo Drupal is ready. ; \ + fi # Static drupal image, with codebase baked in. This image # is tagged based on the current git hash/tag. If the image is not present