fix(docker): create required Laravel runtime dirs before composer install
storage/framework/{cache,sessions,views}, storage/logs, and
bootstrap/cache are all gitignored with no tracked placeholder, so a
fresh checkout (as Coolify does) has none of them. composer install's
package:discover post-autoload script writes to bootstrap/cache and
failed with "directory must be present and writable" since it simply
didn't exist yet.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
a56c22953c
commit
3da50c8967
1 changed files with 2 additions and 1 deletions
|
|
@ -17,7 +17,8 @@ WORKDIR /var/www/html
|
|||
COPY backend/ /var/www/html
|
||||
COPY docker/php/entrypoint.prod.sh /entrypoint.sh
|
||||
|
||||
RUN composer install --no-dev --optimize-autoloader --no-interaction \
|
||||
RUN mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache \
|
||||
&& composer install --no-dev --optimize-autoloader --no-interaction \
|
||||
&& chmod +x /entrypoint.sh \
|
||||
&& chown -R www-data:www-data storage bootstrap/cache
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue