Skip to content

Commit

Permalink
Merge pull request #2 from WildCodeSchool/fix_uploads_dir
Browse files Browse the repository at this point in the history
move mkdir from Dockerfile to docker-entry.sh
  • Loading branch information
Sylvain Blondeau authored Apr 28, 2023
2 parents 4ad36e5 + f72324f commit afafd38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ WORKDIR /var/www
COPY . /var/www/

COPY --from=composer /composer /usr/bin/composer
RUN mkdir -p /var/www/public/uploads/

# RUN chown -R www-data:www-data /var/www/

RUN adduser nginx www-data \
&& chgrp -R www-data /var/www/public/uploads/ \
&& chmod -R 775 /var/www/public/uploads/


EXPOSE 80

Expand Down
3 changes: 3 additions & 0 deletions docker-entry.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
mkdir -p /var/www/public/uploads
chmod -R 777 /var/www/public/uploads

set -e

composer install \
Expand Down

0 comments on commit afafd38

Please sign in to comment.