diff --git a/distillery/provision.sh b/distillery/provision.sh index dfb4d73..28b15b2 100755 --- a/distillery/provision.sh +++ b/distillery/provision.sh @@ -83,6 +83,7 @@ load_template "docker-env/barrel" \ "SLUG" "${SLUG}" \ "LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \ "LETSENCRYPT_EMAIL" "${LETSENCRYPT_EMAIL}" \ + "DISTILLERY_DIR" "${DIR}" \ > "$INSTANCE_BASE_DIR/.env" diff --git a/distillery/resources/compose/barrel/.env.sample b/distillery/resources/compose/barrel/.env.sample index 6763a7f..e7517ad 100644 --- a/distillery/resources/compose/barrel/.env.sample +++ b/distillery/resources/compose/barrel/.env.sample @@ -4,6 +4,7 @@ # Real path for volumes to be stored REAL_PATH=/var/www/example.slug +DISTILLERY_DIR=/distillery/ ####################### ### Web Server settings diff --git a/distillery/resources/compose/barrel/docker-compose.yml b/distillery/resources/compose/barrel/docker-compose.yml index d9795cc..183f997 100644 --- a/distillery/resources/compose/barrel/docker-compose.yml +++ b/distillery/resources/compose/barrel/docker-compose.yml @@ -25,6 +25,7 @@ services: - ${REAL_PATH}/.composer:/var/www/.composer - ${REAL_PATH}/data:/var/www/data - ${REAL_PATH}/authorized_keys:/var/www/.ssh/authorized_keys + - ${DISTILLERY_DIR}/utils:/utils:ro networks: default: diff --git a/distillery/resources/templates/docker-env/barrel b/distillery/resources/templates/docker-env/barrel index e30c954..eea9266 100644 --- a/distillery/resources/templates/docker-env/barrel +++ b/distillery/resources/templates/docker-env/barrel @@ -1,4 +1,5 @@ REAL_PATH=${REAL_PATH} +DISTILLERY_DIR=${DISTILLERY_DIR} SLUG=${SLUG} VIRTUAL_HOST=${VIRTUAL_HOST} diff --git a/distillery/utils/blind_update.sh b/distillery/utils/blind_update.sh new file mode 100644 index 0000000..37efdb4 --- /dev/null +++ b/distillery/utils/blind_update.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# This utility script can be used to blindly update all dependencies to their latest versions. +# It does not perform any checking whatsoever. + +cd /var/www/data/project || exit 1 + +# composer install updates +chmod u+rw web/sites/default/ +composer update + +# update the dabatabase +drush -y updatedb \ No newline at end of file diff --git a/distillery/utils/set_trusted_host.sh b/distillery/utils/set_trusted_host.sh index 194097f..95b4cf4 100755 --- a/distillery/utils/set_trusted_host.sh +++ b/distillery/utils/set_trusted_host.sh @@ -1,7 +1,7 @@ #!/bin/bash # This utility script can be used to configure the trusted host settings inside of settings.php. -# It doesn't take care of corner cases and should only be used when needed +# It doesn't take care of corner cases and should only be used when needed. INSTANCE_DOMAIN="$(hostname -f)" chmod u+w web/sites/default/settings.php