Fix production assets in rebuild image

Exclude the Vite hot file from Docker builds and copy the SPOTA logo into the container so production deploys load compiled CSS and logo assets.
This commit is contained in:
Power BI Dev
2026-05-03 19:38:35 +07:00
parent 9a3849c04f
commit 80f3e52596
2 changed files with 3 additions and 0 deletions

View File

@@ -33,3 +33,4 @@ rebuild/storage/framework/cache/*
rebuild/storage/framework/sessions/*
rebuild/storage/framework/views/*
rebuild/bootstrap/cache/*.php
rebuild/public/hot

View File

@@ -34,12 +34,14 @@ COPY docker/apache-laravel-vhost.conf /etc/apache2/sites-available/000-default.c
WORKDIR /var/www/html
COPY rebuild/ /var/www/html
COPY link6.jpg /var/www/link6.jpg
COPY --from=vendor /app/vendor /var/www/html/vendor
COPY --from=assets /app/public/build /var/www/html/public/build
COPY docker/laravel-entrypoint.sh /usr/local/bin/laravel-entrypoint
RUN chmod +x /usr/local/bin/laravel-entrypoint \
&& mkdir -p storage/app storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache public/build \
&& rm -f public/hot \
&& rm -f bootstrap/cache/*.php \
&& APP_ENV=production APP_DEBUG=false APP_KEY=base64:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=spota_spotadb DB_USERNAME=spota_user DB_PASSWORD=spota_password SESSION_DRIVER=file CACHE_STORE=file QUEUE_CONNECTION=sync php artisan package:discover --ansi \
&& chown -R www-data:www-data storage bootstrap/cache public/build