Add utility scripts

This commit adds a new utility script and makes sure that it is mounted
inside the containers.
This commit is contained in:
Tom Wiesing 2020-10-08 14:51:45 +02:00
parent d1949464e2
commit 70cdf7c602
No known key found for this signature in database
GPG key ID: DC1F29F2BC78AB15
6 changed files with 18 additions and 1 deletions

View file

@ -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"

View file

@ -4,6 +4,7 @@
# Real path for volumes to be stored
REAL_PATH=/var/www/example.slug
DISTILLERY_DIR=/distillery/
#######################
### Web Server settings

View file

@ -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:

View file

@ -1,4 +1,5 @@
REAL_PATH=${REAL_PATH}
DISTILLERY_DIR=${DISTILLERY_DIR}
SLUG=${SLUG}
VIRTUAL_HOST=${VIRTUAL_HOST}

View file

@ -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

View file

@ -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