diff --git a/config/fortify.php b/config/fortify.php index 2dbf195..abc1420 100644 --- a/config/fortify.php +++ b/config/fortify.php @@ -130,7 +130,7 @@ return [ | */ - 'views' => false, + 'views' => true, /* |-------------------------------------------------------------------------- diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 2acbffd..928f40e 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -7,6 +7,14 @@ server { charset utf-8; + # Gzip compression + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml; + gzip_min_length 1000; + # Handle static files directly location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map)$ { expires max; @@ -14,6 +22,12 @@ server { access_log off; } + location /build/ { + expires max; + add_header Cache-Control "public, immutable"; + gzip_static on; + } + # Laravel routing — try files, then directories, then pass to index.php location / { try_files $uri $uri/ /index.php?$query_string; diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 55945c4..99e8e4c 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -28,6 +28,10 @@ RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ RUN pecl install redis \ && docker-php-ext-enable redis +# Enable OPcache +RUN docker-php-ext-enable opcache +COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini + # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer diff --git a/docker/php/opcache.ini b/docker/php/opcache.ini new file mode 100644 index 0000000..211dda9 --- /dev/null +++ b/docker/php/opcache.ini @@ -0,0 +1,9 @@ +[opcache] +opcache.enable=1 +opcache.memory_consumption=256 +opcache.interned_strings_buffer=64 +opcache.max_accelerated_files=32531 +opcache.validate_timestamps=1 +opcache.revalidate_freq=0 +opcache.save_comments=1 +opcache.fast_shutdown=1 diff --git a/resources/css/app.css b/resources/css/app.css index 36ce7f7..265daaf 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,7 +1,7 @@ @import "tailwindcss"; -@import "@fontsource/vt323"; -@import "@fontsource/press-start-2p"; -@import "@fontsource/ibm-plex-mono"; +@import "@fontsource/vt323/latin.css"; +@import "@fontsource/press-start-2p/latin.css"; +@import "@fontsource/ibm-plex-mono/latin.css"; @theme { --color-bg-deep: #1a1a2e; diff --git a/resources/js/app.js b/resources/js/app.js index 3cdfaa7..5ec8405 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -4,8 +4,8 @@ import { createPinia } from 'pinia' createInertiaApp({ resolve: name => { - const pages = import.meta.glob('./Pages/**/*.vue', { eager: true }) - return pages[`./Pages/${name}.vue`] + const pages = import.meta.glob('./Pages/**/*.vue') + return pages[`./Pages/${name}.vue`]() }, setup({ el, App, props, plugin }) { const pinia = createPinia()