Feat: Adding vendor publish for nginx to be able to grab them

This commit is contained in:
2026-09-28 20:38:46 +03:00
parent c48d3b1756
commit 8025bf2692
+8 -8
View File
@@ -94,14 +94,14 @@ COPY . .
RUN chown -R www-data:www-data storage bootstrap/cache \
&& chmod -R 775 storage bootstrap/cache
# No package:discover/vendor:publish/filament:assets here. Asset-publish
# output (public/vendor/*, etc.) is generated locally and committed, so
# `COPY . .` above already ships it. package:discover would only pre-warm
# bootstrap/cache/packages.php — Laravel discovers providers live from
# vendor/composer/installed.json on first boot if that cache is absent, so
# it's not required — and some provider queries the DB during discovery,
# which this build stage has no connection for (no .env in the build
# context), so running it here would need a database that doesn't exist yet.
# Publishes into THIS stage's public/ so nginx's own build stage below
# (COPY --from=production /var/www/html/public ...) picks them up too —
# nginx has no shared volume with app, so its public/ is otherwise frozen
# at whatever was last baked into its image.
RUN php artisan vendor:publish --tag=core-assets --force --ansi \
&& php artisan vendor:publish --tag=public --force --ansi \
&& php artisan filament:assets --ansi
COPY docker/entrypoint.sh /entrypoint.sh
COPY docker/entrypoint-worker.sh /entrypoint-worker.sh
RUN chmod +x /entrypoint.sh /entrypoint-worker.sh