Skip to content

Commit f553f8a

Browse files
author
admin
committed
Added ENV var to set for SSL/TLS sites.
1 parent 6b1538e commit f553f8a

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ MAINTAINER gabriel schubiner <[email protected]>
66
RUN apt-get update && apt-get install -y --no-install-recommends \
77
apache2 \
88
libapache2-mod-php5 \
9+
build-essential \
910
php5 \
11+
php5-dev \
1012
php5-mysqlnd \
1113
php5-imap \
1214
php5-cli \
@@ -25,8 +27,8 @@ RUN chmod +x /etc/cron.hourly/openatrium
2527

2628
# Apache Cfg
2729
RUN rm -f /etc/apache2/sites-enabled/*
28-
ADD ./assets/apache.openatrium.conf /etc/apache2/sites-available/000-openatrium.conf
29-
RUN ln -s /etc/apache2/sites-available/000-openatrium.conf /etc/apache2/sites-enabled/000-openatrium.conf
30+
ADD assets/apache.openatrium.conf /etc/apache2/sites-available/
31+
RUN ln -s /etc/apache2/sites-available/apache.openatrium.conf /etc/apache2/sites-enabled/openatrium.conf
3032
RUN a2enmod rewrite
3133

3234
# PHP Config
@@ -42,6 +44,9 @@ ADD ./assets/update_php_vars.sh /usr/bin/
4244
RUN chmod +x /usr/bin/update_php_vars.sh
4345
RUN update_php_vars.sh
4446
RUN php5enmod imap
47+
RUN pecl install -Z uploadprogress && \
48+
echo 'extension=uploadprogress.so' >/etc/php5/mods-available/uploadprogress.ini && \
49+
php5enmod uploadprogress
4550

4651
# Default ENV vars
4752
## Apache

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ The relevant variables (with default settings) are:
2424
- SITE_MAIL [email protected]
2525
- INSTALL_SITE true
2626

27-
2827
### Manual Installation
2928
For standard drupal/OA install procedure, you must access http://site-name.tld/install.php directly. Drupal won't redirect http://site-name.tld to the install page directly, because settings.php has been modified with database settings (assuming you linked an appropriate MariaDB/MySQL container. you did, right?)
3029

@@ -123,14 +122,17 @@ At least that's the idea. Nobody's tested it yet.
123122
This tells init.sh not to fix permissions on the /var/www/html directory tree to drupal standard settings. Change to "true" to turn this off if you disagree with the permissions. Actual settings can be found in /etc/my_init.d/init.sh, but for a better description, they follow these guidelines:
124123
- https://www.drupal.org/node/244924
125124

126-
### INSTALL SITE
125+
### INSTALL SITE / DRUPAL
127126
- ACCOUNT_NAME admin
128127
- ACCOUNT_PASS insecurepass
129128
- ACCOUNT_MAIL [email protected]
130129
- SITE_NAME Open Atrium
131130
- SITE_MAIL [email protected]
132131
- INSTALL_SITE true
133132

133+
- BASE_URL '' :: Sets `$base_url` in settings.php. If you're planning on using SSL/TLS, you'll want to set this to https://domain.tld
134+
Note that there should be no trailing '/'. This will prevent mixed security warnings, and browsers may not load your sites resources--images, etc.
135+
134136
### EMAIL
135137

136138

assets/init.sh

+9
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ EOF
185185
popd
186186
}
187187

188+
function set_site_base {
189+
if [[ -n $BASE_URL ]]; then
190+
echo "Setting site_base_name in settings.php"
191+
sed -i -e 's/# $base_url .*/$base_url = '"$BASE_URL"'/' /var/www/html/sites/default/setttings.php
192+
echo "Done"
193+
fi
194+
}
195+
188196
function check_ssh {
189197
echo "Checking SSH."
190198
if [[ $DISABLE_SSH == false ]]; then
@@ -221,6 +229,7 @@ function bootstrap {
221229
else
222230
echo "Either INSTALL_SITE (=$INSTALL_SITE) or AUTO_DB_SETTINGS (=$AUTO_DB_SETTINGS) is set to disallow automatic install."
223231
fi
232+
set_site_base
224233
echo "Repairing Permissions to Drupal default"
225234
restore_permissions
226235
echo "Done bootstrapping container. Noted with /data/.bootstrap"

0 commit comments

Comments
 (0)