问题标签 [laravel-vapor]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
laravel - Laravel Vapor - 在公共开发数据库上创建用户失败并出现错误:需要跳转框
Laravel Vapor 数据库文档指出:
要快速创建最小性能等级的可公开访问的数据库,您可以
--dev
在创建数据库时使用该标志。这些小型、经济实惠的数据库非常适合测试或暂存环境
我已经使用建议的vapor database dev-db --dev
命令创建了一个开发数据库,并且db.t3.micro
已经在 AWS 中创建了一个公共数据库,但是当我使用该vapor database:user dev-db user1
命令向数据库添加一个额外的用户时,我收到一个需要跳转框的错误:
哎呀!您的请求存在一些问题。
- 创建数据库用户需要跳转框。
关于私有/公共数据库的文档指出:
此外,这些数据库可能是公开的(使用由 Vapor 自动分配的长而随机的密码)或私有的。通常不能从公共 Internet 访问私有数据库。要从本地计算机访问它们,您需要创建一个 Vapor jumpbox。
既然--dev
数据库创建命令创建了一个可公开访问的数据库,为什么会返回一个错误,说明需要跳转框?
docker - 使用 Docker for Laravel Vapor 在 php8 上安装 Imagick
我看到一些帖子让 Imagick 使用来自 Imagick 存储库的提交的 Docker 映像在 php 8 上工作。Imagick 没有正式准备好 php 8,因为它没有通过其他测试,但可以在 php 8 上正常工作。
需要一个指针来让它在我的本地工作,然后到 Laravel Vapor。这意味着在 Dockerfile 中工作,但docker-php-ext-install
在运行时找不到sail build
更新:这适用于蒸汽。staging.dockerfile 应该是这样的:
所以我仍然遇到的问题是将它带到我的本地。使用风帆构建
laravel - mkdir() 在本地环境中运行时在无服务器上点击请求时无法正常工作
附上的图片供参考,从中可以看出,我在蒸汽上点击了 API,但 MKDIR() 不是 Laravel 蒸汽,它在本地完美地工作。
laravel - 如何在 Laravel Vapor 中运行带参数的命令
我刚开始测试 Laravel Vapor,一切都运行良好,除了我正在使用 filament 包,它需要运行一个命令来创建管理员用户,该命令在我的计算机上本地工作,我现在有一个用户,但是当我执行时在生产中命令(./vendor/bin/vapor command production),然后是创建用户的命令(php artisan make:filament-user)。vapor 没有提供任何输入来输入我的姓名和电子邮件地址。那么,无论如何,是否可以为蒸汽中的命令提供论据?或者无论如何用命令给出这些参数?谢谢你
laravel - Laravel vapor github 操作引发权限错误
我正在尝试使用 Github Actions 部署到蒸汽。我正在使用https://docs.vapor.build/1.0/projects/deployments.html#deploying-from-ci上描述的操作。
由于此错误,github 操作一直失败:
我已经尝试过传递 GITHUB_TOKEN,但不知何故不起作用。
laravel - How to serve lazy-loaded Vue JS chunks from CDN
I work on a single-page application written in Vue.js 3 and built by Vue CLI 5 (Webpack 5). The app is being served from a Laravel app which is deployed to AWS by Laravel Vapor. This tool also uploads all static assets (including JS chunks) to AWS S3 and make them available via CloudFront.
I want to load all static assets used in the Vue.js app from this CDN. The URL of the CloudFront distribution is available at build time in ASSET_URL
environment variable. I have written my own asset
functions in both TS and SCSS which are able to resolve asset paths properly for both local development and production environment. I use these functions whenever I write a URL of a static asset (image, font, etc.) in either .scss
or .vue
file and everything works fine.
But I am not able to make Vue.js app load JS chunks from CDN. When I modify publicPath option in vue.config.js
, Vue Router gets broken. If I try to change output.publicPath directly in Webpack config, I get an error from Vue CLI saying that I cannot modify it directly.
So I have written a script that rewrites all URLs pointing to static assets in the generated index.blade.php
file (similar to index.html
in a typical Vue.js project) and initial JS chunks are loaded from CDN now. However, all lazy-loaded chunks are still being loaded from the server where Laravel app is deployed. It looks like these paths are somehow defined the generated app.f73fadef.js
file.
So my question is, how can I load all static assets (including JS chunks) from CDN while serving an app from a dynamic web server? Is it even possible to do this just by changing Vue CLI or Webpack config and without any dirty "hacks" (like modifying generated JS files)?
laravel - 在 Lravel Vapor 上优化图像文件
我正在使用 Laravel Vapor 来托管一个网站。到目前为止,我还没有遇到缺少文件系统的问题,但现在我遇到了障碍。
我正在尝试优化 .png 和 .jpeg 文件,而我发现的库需要一个文件系统来编写压缩文件:
PHP 图像缓存 ( https://nielse63.github.io/php-image-cache/ )
我猜我可以设置一个在额外的传统服务器上运行的外部服务......但我更愿意让它与 Vapor 一起工作。
有任何想法吗?
laravel - 如何在 API Gateway 上启用 gzip 压缩?
我在 API Gateway 上启用 gzip 压缩有点麻烦。我正在使用 Laravel Vapor,它在后台使用 AWS Lambda。
我已经搜索了 API Gateway 控制台仪表板的设置,但无济于事。我在我的应用程序中设置了 CORS,并且启用了以下功能:
我的印象是,Accept-Encoding
在我的后端设置可以解决问题,但它根本不起作用。响应标头中从来没有Content-Encoding: gzip
。