-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I'm not sure this is actually causing any problems, but I believe that LAGOON_KUBERNETES will always be blank unless the lagoon environment scripts are first sourced into the script.
If this is a catch for local development, won't LAGOON_KUBERNETES always be empty? In that case I'm not following what the check is doing because it will always fall through I think?
FLAG_FILE="/app/scaffolding_done.flag"
cd /app
# Check if the flag file exists
if [ ! -f "$FLAG_FILE" ]; then
echo "*** NO SCAFFOLD FILE FOUND ***"
git config --global --add safe.directory /app
if [ -z "$LAGOON_KUBERNETES" ]; then
echo "Not running in Lagoon - we will try install"
composer install --no-dev
cp -r /app/vendor/drupal/cms/web/profiles/drupal_cms_installer /app/web/profiles/
cp /app/drush/Commands/contrib/drupal_integrations/assets/* /app/web/sites/default
fi
# Create the flag file to indicate the script has run
echo "About to create $FLAG_FILE"
touch "$FLAG_FILE"
else
echo "*** SCAFFOLD FILE FOUND ***"
echo "The initialization script has already run."
fi
# here we attempt to copy the details
if [ ! -f "/app/web/sites/default/settings.php" ]; then
cp /app/.lagoon/assets/* /app/web/sites/default
mv /app/web/sites/default/initial.settings.php /app/web/sites/default/settings.php
fi
~
For the Laravel entry point I source them in like so (lifted from the Lagoon scripts)
#!/bin/sh
# Loading environment variables from .env and friends
source /lagoon/entrypoints/50-dotenv.sh
# Generate some additional enviornment variables
source /lagoon/entrypoints/55-generate-env.sh
``
Metadata
Metadata
Assignees
Labels
No labels