Skip to content

Commit 107884a

Browse files
committed
Adjusted logging in docker image
1 parent 3850f12 commit 107884a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.docker/os2web/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,19 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /opt/drupal/web/sites/d
4747
rm -rf /opt/drupal/web/sites/default/files; \
4848
ln -sf /opt/drupal/files /opt/drupal/web/sites/default/files; \
4949
mkdir -p private; \
50-
# Adding syn directory.
50+
# Adding sync directory.
5151
mkdir -p config/sync; \
5252
# Adjusting ownership
53-
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync /opt/drupal/tmp; \
53+
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync /opt/drupal/tmp /opt/drupal/logs; \
5454
chmod g+s -R /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
5555

5656
# Adding custom apache configuration with PHP value and log settings.
5757
COPY apache/000-default.conf /etc/apache2/sites-enabled/000-default.conf
5858

59+
# Addjusting output channels for access and error log.
60+
RUN ln -sf /dev/stderr /var/log/apache2/error.log; \
61+
ln -sf /dev/stdout /var/log/apache2/access.log; \
62+
ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log
63+
5964
# Adding Drupal settings.
6065
COPY settings/prod.settings.php /opt/drupal/web/sites/default/

.docker/os2web/apache/000-default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
php_value html_errors 0
2828
php_value display_errors 0
2929
php_admin_value error_reporting 1023
30-
php_value error_log /opt/drupal/logs/php.log
30+
php_value error_log /dev/stderr
3131

3232
php_value session.save_path /opt/drupal/sessions
3333
php_admin_value upload_max_filesize 150

.docker/os2web/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ if [ $# -eq 0 ]; then
77
exit 0
88
fi
99

10+
echo "Updating base image"
11+
docker image pull drupal:8-apache-buster
12+
1013
docker build ./ --build-arg OS2WEB8_TAG=$1 -t dkbellcom/os2web8:$1
1114

1215
if [ "$2" = "--push" ]; then

0 commit comments

Comments
 (0)