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:
@@ -33,3 +33,4 @@ rebuild/storage/framework/cache/*
|
||||
rebuild/storage/framework/sessions/*
|
||||
rebuild/storage/framework/views/*
|
||||
rebuild/bootstrap/cache/*.php
|
||||
rebuild/public/hot
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user