Skip to content

Commit

Permalink
Adjusted logging in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyun committed Apr 12, 2021
1 parent 3850f12 commit 107884a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .docker/os2web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /opt/drupal/web/sites/d
rm -rf /opt/drupal/web/sites/default/files; \
ln -sf /opt/drupal/files /opt/drupal/web/sites/default/files; \
mkdir -p private; \
# Adding syn directory.
# Adding sync directory.
mkdir -p config/sync; \
# Adjusting ownership
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync /opt/drupal/tmp; \
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync /opt/drupal/tmp /opt/drupal/logs; \
chmod g+s -R /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync

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

# Addjusting output channels for access and error log.
RUN ln -sf /dev/stderr /var/log/apache2/error.log; \
ln -sf /dev/stdout /var/log/apache2/access.log; \
ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log

# Adding Drupal settings.
COPY settings/prod.settings.php /opt/drupal/web/sites/default/
2 changes: 1 addition & 1 deletion .docker/os2web/apache/000-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
php_value html_errors 0
php_value display_errors 0
php_admin_value error_reporting 1023
php_value error_log /opt/drupal/logs/php.log
php_value error_log /dev/stderr

php_value session.save_path /opt/drupal/sessions
php_admin_value upload_max_filesize 150
Expand Down
3 changes: 3 additions & 0 deletions .docker/os2web/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ if [ $# -eq 0 ]; then
exit 0
fi

echo "Updating base image"
docker image pull drupal:8-apache-buster

docker build ./ --build-arg OS2WEB8_TAG=$1 -t dkbellcom/os2web8:$1

if [ "$2" = "--push" ]; then
Expand Down

0 comments on commit 107884a

Please sign in to comment.