generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
sidecar-browsershot
config and warming support (#18)
* Add sidecar-browsershot config file * Use config ins BrowsershotFunction * Add comments to config * Document Warming
- Loading branch information
1 parent
fd52a89
commit 82fddc9
Showing
4 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
return [ | ||
/** | ||
* Define the allocated memory available to SidecarBrowsershot in megabytes. (Defaults to 2GB) | ||
* We suggest to allocate at least 513 MB of memory to push Chrome/Puppeteer out of "low-spec" mode. | ||
* @see https://hammerstone.dev/sidecar/docs/main/functions/customization#memory | ||
* @see https://github.blog/2021-06-22-framework-building-open-graph-images/ | ||
*/ | ||
'memory' => env('SIDECAR_BROWSERSHOT_MEMORY', 2048), | ||
|
||
/** | ||
* Define the number of warming instances to boot. | ||
* @see https://hammerstone.dev/sidecar/docs/main/functions/warming | ||
*/ | ||
'warming' => env('SIDECAR_BROWSERSHOT_WARMING_INSTANCES', 0), | ||
|
||
/** | ||
* AWS Layer to use by Lambda. Defaults to "shelfio/chrome-aws-lambda-layer" in your AWS region. | ||
* Must contain "chrome-aws-lambda". | ||
* @see https://github.com/shelfio/chrome-aws-lambda-layer | ||
*/ | ||
'layer' => env('SIDECAR_BROWSERSHOT_LAYER'), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters