Skip to content

Commit

Permalink
doesn't belong in dockerfile, belongs in entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Moros1138 committed May 2, 2024
1 parent b557804 commit 4f928a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ WORKDIR /var/www/html
RUN chmod 755 -R /var/www/html/storage/ && \
chown -R www-data:www-data /var/www/ && \
su -c "bash build-libs.sh" -s /bin/bash www-data && \
su -c "php artisan config:clear" -s /bin/bash www-data && \
su -c "php artisan cache:clear" -s /bin/bash www-data && \
su -c "php artisan view:clear" -s /bin/bash www-data && \
su -c "php artisan route:clear" -s /bin/bash www-data && \
a2enmod rewrite

ENTRYPOINT [ "/bin/bash" ]
Expand Down
6 changes: 4 additions & 2 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/bash

# refresh the cache at startup
su -c "php artisan config:cache" -s /bin/bash www-data
su -c "php artisan route:cache" -s /bin/bash www-data
su -c "php artisan config:clear" -s /bin/bash www-data
su -c "php artisan cache:clear" -s /bin/bash www-data
su -c "php artisan view:clear" -s /bin/bash www-data
su -c "php artisan route:clear" -s /bin/bash www-data

# the server
apache2-foreground

0 comments on commit 4f928a5

Please sign in to comment.