Skip to content
Snippets Groups Projects
Commit 1b064bd5 authored by Romanos Dodopoulos's avatar Romanos Dodopoulos
Browse files

Use Dockerfile variable instead [complete]

parent 140001b3
No related branches found
No related tags found
No related merge requests found
Pipeline #553421 passed
......@@ -26,7 +26,6 @@ docker run -i --privileged \
-e DRUSH_DATABASE='ds990108' \
-e DRUSH_EGROUP='drupal-admins-test-edu-d8-ldap' \
-e DRUSH_OWNER='eduardoa' \
-e DRUSH_DRUPAL_VERSION='8.5.6' \
-t <image_id> /bin/bash
```
or with a file
......
<?php
$options['uri'] = '$DRUSH_SITENAME';
$options['root'] = '/drupal/$DRUSH_DRUPAL_VERSION';
$options['root'] = '/drupal/$DRUPAL_VERSION';
......@@ -11,7 +11,7 @@ $databases['default']['default'] = array (
'driver' => 'mysql',
);
if (file_exists("/drupal/$DRUSH_DRUPAL_VERSION/sites/$DRUSH_SITENAME/private/.docker.rerun.flag")) {
if (file_exists("/drupal/$DRUPAL_VERSION/sites/$DRUSH_SITENAME/private/.docker.rerun.flag")) {
$databases['default']['default']['password'] = null;
print("The docker image has been updated. Please exit right now and rerun it!\n");
exit;
......
......@@ -24,7 +24,7 @@ mkdir -p /drupal/${DRUPAL_VERSION}/sites/${DRUSH_SITENAME}/
find /mnt/site/ -mindepth 1 -maxdepth 1 -type d -exec ln -s {} /drupal/${DRUPAL_VERSION}/sites/${DRUSH_SITENAME}/ \;
#copy settings.php to the final destination
envsubst '$DRUSH_SITENAME$DRUSH_HOST$DRUSH_EGROUP$DRUSH_OWNER$DRUSH_EGROUP$DRUSH_USERNAME$DRUSH_PASSWORD$DRUSH_DATABASE$DRUSH_PORT$DRUSH_DRUPAL_VERSION$DRUPAL_VERSION' < /drush/settings.php > /drupal/${DRUPAL_VERSION}/sites/${DRUSH_SITENAME}/settings.php
envsubst '$DRUSH_SITENAME$DRUSH_HOST$DRUSH_EGROUP$DRUSH_OWNER$DRUSH_EGROUP$DRUSH_USERNAME$DRUSH_PASSWORD$DRUSH_DATABASE$DRUSH_PORT$DRUPAL_VERSION' < /drush/settings.php > /drupal/${DRUPAL_VERSION}/sites/${DRUSH_SITENAME}/settings.php
rm /drupal/${DRUPAL_VERSION}/sites/${DRUSH_SITENAME}/private/.docker.rerun.flag
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment