Skip to content

Commit

Permalink
Run container as www-data to avoid permmissions issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed May 23, 2021
1 parent ab57baf commit a7adc8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker-config/php-dev-craft/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ RUN mkdir -p /var/www/project/cms/web/cpresources && \
chown -R www-data:www-data /var/www/project/cms/web/cpresources

WORKDIR /var/www/project/cms

# run container as the www-data user
USER www-data
3 changes: 3 additions & 0 deletions docker-config/php-prod-craft/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ RUN chown -R www-data:www-data /var/www/project/cms/web

WORKDIR /var/www/project/cms

# run container as the www-data user
USER www-data

# Force permissions, update Craft, and start php-fpm

# Do a `composer install` without running any Composer scripts
Expand Down

0 comments on commit a7adc8c

Please sign in to comment.