Skip to content

Commit c81f5aa

Browse files
committed
Moved out install section to separate script. It should be used by adding source /install.sh line to entrypoint.sh script for installing Drupal.
1 parent 79b2e63 commit c81f5aa

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

.docker/os2web/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /opt/drupal/web/sites/d
4444

4545
COPY settings/prod.settings.php /opt/drupal/web/sites/default/
4646
COPY entrypoint.sh /
47+
COPY install.sh /
4748

4849
# Adding cron tab
4950
COPY crontab /etc/cron.d/drupal

.docker/os2web/entrypoint.sh

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,7 @@ if [ "$PRINT_STATUS" = true ]; then
1010
$DRUSH status
1111
fi;
1212

13-
if [ "$INSTALL_OS2WEB" = true ]; then
14-
echo "Installing new OS2Web installation"
15-
export DRUSH="drush --root=/opt/drupal"
16-
# Install drupal.
17-
$DRUSH sql-drop -y
18-
$DRUSH si os2web --account-pass=admin --locale=da -y
19-
20-
# Enable theme.
21-
if [ -z "$OS2WEB_THEME" ]; then
22-
export OS2WEB_THEME="fds_custom_theme"
23-
fi;
24-
$DRUSH theme:enable $OS2WEB_THEME -y
25-
$DRUSH config-set system.theme default $OS2WEB_THEME -y
26-
27-
# Enable modules.
28-
$DRUSH en -y os2web_pagebuilder os2web_spotbox
29-
else
30-
echo "Updating project files skipped"
31-
fi;
13+
source /install.sh
3214

3315
if [ "$DEPLOYMENT" = true ]; then
3416
echo "Running deployment"

.docker/os2web/install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
echo "Installing new OS2Web installation"
2+
export DRUSH="drush --root=/opt/drupal"
3+
# Install drupal.
4+
$DRUSH sql-drop -y
5+
$DRUSH si os2web --account-pass=admin --locale=da -y
6+
7+
# Enable theme.
8+
if [ -z "$OS2WEB_THEME" ]; then
9+
export OS2WEB_THEME="fds_custom_theme"
10+
fi;
11+
$DRUSH theme:enable $OS2WEB_THEME -y
12+
$DRUSH config-set system.theme default $OS2WEB_THEME -y
13+
14+
# Enable modules.
15+
$DRUSH en -y os2web_pagebuilder os2web_spotbox

0 commit comments

Comments
 (0)