|
|
@@ -123,9 +123,9 @@ RUN apk add --no-cache nginx && \
|
|
|
# 从第一阶段复制构建好的前端资源
|
|
|
COPY --from=frontend-builder /app/public/build ./public/build
|
|
|
|
|
|
-# 缓存路由和视图(不缓存配置,配置在运行时从 .env 读取)
|
|
|
-RUN php artisan route:cache && \
|
|
|
- php artisan view:cache && \
|
|
|
+# 不在镜像构建时 route:cache:.dockerignore 排除了 .env,构建时 APP_KEY 与生产不一致;
|
|
|
+# Livewire v4 的 /livewire-{hash}/update 前缀由 APP_KEY 派生,错缓存会导致 /admin 下 Livewire 404。
|
|
|
+RUN php artisan view:cache && \
|
|
|
php artisan filament:upgrade || true
|
|
|
|
|
|
# 复制 Nginx 和 PHP-FPM 配置
|
|
|
@@ -236,8 +236,7 @@ COPY --from=frontend-builder /app/public/build ./public/build
|
|
|
RUN mkdir -p storage/logs storage/framework/cache storage/framework/sessions storage/framework/views bootstrap/cache && \
|
|
|
chmod -R 775 storage bootstrap/cache
|
|
|
|
|
|
-RUN php artisan route:cache && \
|
|
|
- php artisan view:cache && \
|
|
|
+RUN php artisan view:cache && \
|
|
|
php artisan filament:upgrade || true
|
|
|
|
|
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|