Skip to content

Commit

Permalink
Added permission handling steps to docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyun committed Jan 13, 2021
1 parent acc4041 commit 8927bd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .docker/os2web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ RUN echo '<?php $settings["project_env"] = PROD_ENV; ' > /opt/drupal/web/sites/d
# Adding syn directory.
mkdir -p config/sync; \
# Adjusting ownership
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync; \
chmod g+s -R /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync

COPY settings/prod.settings.php /opt/drupal/web/sites/default/
COPY entrypoint.sh /
Expand Down
4 changes: 4 additions & 0 deletions .docker/os2web/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ else
echo "Deployment skipped"
fi;

# Making sure that all files belong apache web server user.
chown -R www-data:www-data /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync
chmod g+s /opt/drupal/private /opt/drupal/files /opt/drupal/config/sync

# Starting cron service.
service cron start

Expand Down

0 comments on commit 8927bd7

Please sign in to comment.