40 - Fix Livewire assets and Caddy config for production
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m31s
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m31s
This commit is contained in:
parent
7b3a59da10
commit
546942230b
1 changed files with 6 additions and 9 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -31,10 +31,11 @@ RUN npm run build
|
||||||
# Remove node_modules after build to save space
|
# Remove node_modules after build to save space
|
||||||
RUN rm -rf node_modules
|
RUN rm -rf node_modules
|
||||||
|
|
||||||
# Publish Livewire assets and Laravel optimizations
|
# Publish Livewire assets
|
||||||
RUN php artisan livewire:publish --assets \
|
RUN php artisan livewire:publish --assets
|
||||||
&& php artisan config:cache \
|
|
||||||
&& php artisan route:cache \
|
# Laravel optimizations (skip route cache - Livewire registers routes dynamically)
|
||||||
|
RUN php artisan config:cache \
|
||||||
&& php artisan view:cache \
|
&& php artisan view:cache \
|
||||||
&& composer dump-autoload --optimize
|
&& composer dump-autoload --optimize
|
||||||
|
|
||||||
|
|
@ -51,13 +52,9 @@ RUN cat > /etc/caddy/Caddyfile <<EOF
|
||||||
:8000 {
|
:8000 {
|
||||||
root * /app/public
|
root * /app/public
|
||||||
|
|
||||||
php_server {
|
|
||||||
index index.php
|
|
||||||
}
|
|
||||||
|
|
||||||
encode gzip
|
encode gzip
|
||||||
|
|
||||||
file_server
|
php_server
|
||||||
|
|
||||||
header {
|
header {
|
||||||
X-Frame-Options "SAMEORIGIN"
|
X-Frame-Options "SAMEORIGIN"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue