Skip to content
Snippets Groups Projects
Commit 627e79df authored by Eduardo Alvarez Fernandez's avatar Eduardo Alvarez Fernandez
Browse files

Added

- cleanup on prepare environment script
- settings.php
parent 4620eb2d
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ RUN yum clean all \
&& yum install -y centos-release-scl \
&& yum-config-manager --enable rhel-server-rhscl-7-rpms \
&& yum install -y rh-php71 rh-php71-php-pdo rh-php71-php-pdo_mysql \
&& yum install -y composer unzip which davfs2
&& yum install -y composer unzip which davfs2 gettext
RUN scl enable rh-php71 bash
......@@ -19,6 +19,7 @@ RUN mkdir /drupal \
&& chmod 744 /usr/bin/prepare-enviroment.sh
COPY drush/site.alias.drushrc.php /drush/site.alias.drushrc.php
COPY drush/settings.php /drush/settings.php
COPY drupal/ /drupal/
......
<?php
$databases['default']['default'] = array (
'database' => "$DRUSH_DATABASE",
'username' => "$DRUSH_USERNAME",
'password' => "$DRUSH_PASSWORD",
'host' => "$DRUSH_HOST",
'port' => "$DRUSH_PORT",
'prefix' => '',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
$settings['hash_salt'] = hash("sha256","$DRUSH_USERNAME" . "$DRUSH_HOST" . "$DRUSH_PASSWORD");
$settings['install_profile'] = 'cern';
$config_directories['sync'] = "sites/$DRUSH_SITENAME/files/config_/sync";
$trusted_host_pattern="^". str_replace(".","\.","$DRUSH_SITENAME") . "$";
$settings['trusted_host_patterns'] = array(
$trusted_host_pattern,
);
$settings['file_private_path'] = "/drupal/sites/$DRUSH_SITENAME/private";
$settings['simplesamlphp_dir'] = '/var/simplesamlphp';
// TODO needs to be finished, should be fine for now..
......@@ -2,14 +2,29 @@
#This script will be the first thing executed by users to finalize the preparation of the environment
#Cleanup previous executions
umount /mnt/site
rm -rf /mnt/site
rm -rf /drupal/sites/${DRUSH_SITENAME}/
#mount the webdav site's folder
mkdir -p /mnt/site
mount -t davfs https://${DRUSH_SITENAME}/_webdav /mnt/site
#enable php 7.1 globally
scl enable rh-php71 bash
#prepare the drush alias
cp /drush/site.alias.drushrc.php /drush/aliases/${DRUSH_SITENAME}.alias.drushrc.php
# create folder for the site
mkdir -p /drupal/sites/${DRUSH_SITENAME}/
#symlink all webdav files to the final destination
ln -s /mnt/site/* /drupal/sites/${DRUSH_SITENAME}/
#copy settings.php to the final destination
envsubst < /drush/settings.php > /drupal/sites/${DRUSH_SITENAME}/settings.php
#enable php71
source scl_source enable rh-php71
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment