Skip to content
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
5 changes: 5 additions & 0 deletions src/BrefServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Bref\LaravelBridge\Console\Commands\BrefTinkerCommand;
use Bref\LaravelBridge\Queue\QueueHandler;

use Bref\Monolog\CloudWatchFormatter;
use Illuminate\Console\Events\ScheduledTaskStarting;

use Illuminate\Log\LogManager;
Expand Down Expand Up @@ -168,6 +169,10 @@ protected function fixDefaultConfiguration()
Config::set('logging.default', 'stderr');
}

if (Config::get('logging.channels.stderr.formatter') === null) {
Config::set('logging.channels.stderr.formatter', CloudWatchFormatter::class);
}

if (Config::get('logging.channels.emergency.path') === storage_path('logs/laravel.log')) {
Config::set('logging.channels.emergency', Config::get('logging.channels.stderr'));
}
Expand Down
40 changes: 23 additions & 17 deletions stubs/serverless.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
service: laravel

# Set your team ID if you are using Bref Cloud
# Set your team ID if you are using Bref Cloud (https://bref.sh/cloud)
#bref:
# team: my-team-id

Expand All @@ -11,23 +11,13 @@ provider:
# Environment variables
environment:
APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage
# Replace with a secret variable: https://bref.sh/docs/environment/variables#secrets
APP_KEY: 'base64:aqIOr0nFlPj0RtsUR4MTtIu4EBWohrOr9qcw0xVZE6c='
APP_DEBUG: false
SESSION_DRIVER: cookie # Change to database if you have set up a database

package:
# Files and directories to exclude from deployment
patterns:
- '!node_modules/**'
- '!public/storage'
- '!resources/assets/**'
- '!resources/css/**'
- '!resources/images/**'
- '!resources/js/**'
- '!storage/**'
- '!tests/**'
- '!database/*.sqlite'
# Exclude assets except for the manifest file
- '!public/build/**'
- 'public/build/manifest.json'
# Read more about logging: https://bref.sh/docs/environment/logs
LOG_CHANNEL: stderr
LOG_STDERR_FORMATTER: Bref\Monolog\CloudWatchFormatter

functions:

Expand All @@ -50,6 +40,22 @@ functions:
# rate: rate(1 minute)
# input: '"schedule:run"'

package:
# Files and directories to exclude from deployment
patterns:
- '!node_modules/**'
- '!public/storage'
- '!resources/assets/**'
- '!resources/css/**'
- '!resources/images/**'
- '!resources/js/**'
- '!storage/**'
- '!tests/**'
- '!database/*.sqlite'
# Exclude assets except for the manifest file
- '!public/build/**'
- 'public/build/manifest.json'

plugins:
# We need to include the Bref plugin
- ./vendor/bref/bref