From 80f3e52596f68922a95a52ecb6f2d89eacb744e6 Mon Sep 17 00:00:00 2001 From: Power BI Dev Date: Sun, 3 May 2026 19:38:35 +0700 Subject: [PATCH] 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. --- .dockerignore | 1 + Dockerfile.rebuild | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.dockerignore b/.dockerignore index 984adce..8ad75fe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -33,3 +33,4 @@ rebuild/storage/framework/cache/* rebuild/storage/framework/sessions/* rebuild/storage/framework/views/* rebuild/bootstrap/cache/*.php +rebuild/public/hot diff --git a/Dockerfile.rebuild b/Dockerfile.rebuild index 604cca9..52ab4c2 100644 --- a/Dockerfile.rebuild +++ b/Dockerfile.rebuild @@ -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