-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Move from SAM to Serverless #354
Conversation
# Conflicts: # docs/deploy.md
I got a bit carried away, I rewrote a good part of the documentation to get started and install everything. Much clearer now, and I've added screenshots to create the AWS access keys. I have also finished the plugin and started documenting it. Everything is awesome, I can't wait to release that. The whole developer experience will be much much better I think. |
Preview URL for the documentation: https://5d2303e6a4cbf9110aba55cd--bref-website.netlify.com/docs/environment/serverless-yml.html |
I have deprecated
The command will still work for now, I haven't removed it. |
Regarding local development, since We are separately working on Docker images in #237, that should help running locally with an environment close to production. And it will be super fast as well. But at least it won't block this pull request. |
# Conflicts: # docs/environment/logs.md
I pulled the
|
@lmcnearney thank you for testing, I really appreciate it! Until now I have tested it in the Bref repository, and paths are different here ^^ I'll work on fixing this. Thanks again. |
Thanks for the code example @lmcnearney! That should be fixed. As soon as the build finishes I'll be merging and tagging an alpha version, that way it will be easier to test locally. |
Closes #320, closes #351
This PR implements the change described in #320: switch from SAM to Serverless as the recommended deployment tool.
TODO
Update the SAM testsServerless is slower, I'll keep SAM to run the tests for nowtemplate.yaml
filesWrite an update guideI'll write it in the release notes, I want to keep the website as simple as possibleWhy?
Serverless lets us write much simpler and smaller config for the same result.
Here is a comparison for a HTTP application:
template.yaml
):serverless.yml
):Read #320 for more details on what we gain.
Note that SAM will continue to work with Bref. You don't have to ditch SAM if you'd rather stick with it. That's fine.
Serverless plugin
This closes #351
On top of switching to Serverless, this PR provides a Serverless plugin. For the moment the plugin provides the following variables:
bref:layer.php-72
bref:layer.php-73
bref:layer.php-72-fpm
bref:layer.php-73-fpm
bref:layer.console
This makes it easier to reference Bref layers. Here is a diff to show how to use them:
It is shorter, simpler (no need to care about the region anymore), but it also means we don't have to track and update layer versions anymore. To get the latest versions you just need to update Bref via
composer update
.