Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drush-docker-drupal-admins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Romanos Dodopoulos
drush-docker-drupal-admins
Commits
627e79df
Commit
627e79df
authored
6 years ago
by
Eduardo Alvarez Fernandez
Browse files
Options
Downloads
Patches
Plain Diff
Added
- cleanup on prepare environment script - settings.php
parent
4620eb2d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+2
-1
2 additions, 1 deletion
Dockerfile
drush/settings.php
+27
-0
27 additions, 0 deletions
drush/settings.php
prepare-enviroment.sh
+18
-3
18 additions, 3 deletions
prepare-enviroment.sh
with
47 additions
and
4 deletions
Dockerfile
+
2
−
1
View file @
627e79df
...
...
@@ -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/
...
...
This diff is collapsed.
Click to expand it.
drush/settings.php
0 → 100644
+
27
−
0
View file @
627e79df
<?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..
This diff is collapsed.
Click to expand it.
prepare-enviroment.sh
+
18
−
3
View file @
627e79df
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment