You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/laravel/passport.mdx
+29-10Lines changed: 29 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
import { Steps } from'nextra/components';
2
2
import { NextSeo } from'next-seo';
3
+
import { Tab, Tabs } from'nextra/components';
3
4
4
5
<NextSeodescription="Laravel Passport on AWS Lambda with Bref" />
5
6
@@ -38,21 +39,39 @@ Instead, here is what you need to do:
38
39
39
40
You can now redeploy the application:
40
41
41
-
```yaml
42
-
serverless deploy
43
-
```
44
-
45
-
Note, that during deployment the keys will be stored at `./storage` path not at `/var/task/storage`. Workaround for this is to adjust Passport path with `Passport::loadKeysFrom('storage')`.
46
-
42
+
<Tabs items={['Serverless CLI', 'Bref Cloud']}>
43
+
<Tab>
44
+
```bash
45
+
serverless deploy
46
+
```
47
+
</Tab>
48
+
<Tab>
49
+
```bash
50
+
bref deploy
51
+
```
52
+
</Tab>
53
+
</Tabs>
54
+
55
+
Note, that during deployment the keys will be stored at `./storage` path, not at `/var/task/storage`. Workaround for this is to adjust Passport path with `Passport::loadKeysFrom('storage')`.
47
56
48
57
### Create tokens
49
58
50
59
Finally, you can create the tokens (which is the second part of the `passport:install` command):
51
60
52
-
```bash
53
-
serverless bref:cli --args="passport:client --personal --name 'Laravel Personal Access Client'"
54
-
serverless bref:cli --args="passport:client --password --name 'Laravel Personal Access Client'"
55
-
```
61
+
<Tabsitems={['Serverless CLI', 'Bref Cloud']}>
62
+
<Tab>
63
+
```bash
64
+
serverless bref:cli --args="passport:client --personal --name 'Laravel Personal Access Client'"
65
+
serverless bref:cli --args="passport:client --password --name 'Laravel Personal Access Client'"
66
+
```
67
+
</Tab>
68
+
<Tab>
69
+
```bash
70
+
bref command"passport:client --personal --name 'Laravel Personal Access Client'"
71
+
bref command"passport:client --password --name 'Laravel Personal Access Client'"
Copy file name to clipboardExpand all lines: docs/monitoring.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ By default, AWS Lambda publishes all logs and general metrics (HTTP response tim
4
4
5
5
It is possible to view these logs and metrics directly in the [AWS console](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1). However, the CloudWatch UI can be complex and overwhelming.
6
6
7
-
As an alternative, we can use the [Bref Dashboard](https://dashboard.bref.sh/?ref=bref) to view these logs and metrics. It provides a simpler UI designed for serverless PHP applications.
7
+
As an alternative, we can use the [Bref Cloud](/cloud) to view these logs and metrics. It provides a simpler UI designed for serverless PHP applications.
8
8
9
9
For advanced metrics and profiling, we can use [Tideways](https://tideways.com/?ref=bref), or [Sentry's performance monitoring](/sentry). Note that [Serverless.com's Dashboard](https://www.serverless.com/) is not compatible with PHP.
Copy file name to clipboardExpand all lines: docs/runtimes/console.mdx
+55-22Lines changed: 55 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
import { NextSeo } from'next-seo';
2
+
import { Tab, Tabs } from'nextra/components';
2
3
3
4
<NextSeodescription="Learn how to run serverless console commands on AWS Lambda with Symfony Console or Laravel Artisan." />
4
5
@@ -18,6 +19,7 @@ Console functions can be invoked:
18
19
19
20
- via a cron schedule
20
21
- via the `serverless bref:cli` command
22
+
- via the `bref command` command when using [Bref Cloud](/cloud)
21
23
- manually by invoking the function via the AWS API
22
24
23
25
## Usage
@@ -69,37 +71,68 @@ Read the dedicated documentation for [running cron tasks on AWS Lambda](../use-c
69
71
70
72
### CLI invocation
71
73
72
-
To manually run a console command on AWS Lambda, run `serverless bref:cli` on your computer:
74
+
To manually run a console command on AWS Lambda, run the following command on your computer:
73
75
74
-
```bash
75
-
serverless bref:cli --args="<command to run in lambda>"
76
-
```
76
+
<Tabs items={['Serverless CLI', 'Bref Cloud']}>
77
+
<Tab>
78
+
```bash
79
+
serverless bref:cli --args="{arguments and options for the script}"
80
+
```
77
81
78
-
The `bref:cli` command will automatically detect which function (in `serverless.yml`) uses the `console` runtime and will run the command on that function.
82
+
The `bref:cli` command will automatically detect which function (in `serverless.yml`) uses the `console` runtime and will run the command on that function.
79
83
80
-
Pass your command arguments and options in the `--args` flag (shortcut: `-a`). Remember to escape quotes properly. Some examples:
84
+
Pass your command arguments and options in the `--args` flag (shortcut: `-a`). Remember to escape quotes properly. Some examples:
81
85
82
-
```bash
83
-
# Runs the CLI application without arguments and displays the help
84
-
$ serverless bref:cli
85
-
# ...
86
+
```bash
87
+
# Runs the CLI application without arguments and displays the help
The `bref:cli` command can be used to run CLI commands in Lambda from your machine, but can also be used in CI/CD to run DB migrations for example.
133
+
The `bref command` command can be used to run CLI commands in Lambda from your machine, but can also be used in CI/CD to run DB migrations for example.
0 commit comments