Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added storage config setting #64

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/sidecar-browsershot.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
*/
'memory' => env('SIDECAR_BROWSERSHOT_MEMORY', 2048),

/**
* The default ephemeral storage available to SidecarBrowsershot, in megabytes. (Defaults to 512MB)
* @see https://hammerstone.dev/sidecar/docs/main/functions/customization#storage
*/
'storage' => env('SIDECAR_BROWSERSHOT_STORAGE', 512),

/**
* Define the number of warming instances to boot.
* @see https://hammerstone.dev/sidecar/docs/main/functions/warming
Expand Down
9 changes: 9 additions & 0 deletions src/Functions/BrowsershotFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ public function memory()
return config('sidecar-browsershot.memory');
}

/**
* @inheritDoc
*/
public function storage()
{
// Default to the main sidecar config value if the sidecar-browsershot config hasn't been updated to include this new key.
return config('sidecar-browsershot.storage', parent::storage());
}

public function warmingConfig()
{
return WarmingConfig::instances(config('sidecar-browsershot.warming'));
Expand Down