Created
May 23, 2019 08:24
-
-
Save thibaudlemaire/b25458bbc291adc38c9a8244f3423e8f to your computer and use it in GitHub Desktop.
Makefile for Symfony deployment on AWS Lambda using Bref
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
all: install build package deploy | |
install: | |
composer install --optimize-autoloader --no-dev --no-scripts | |
yarn --production # only if you use Webpack Encore | |
build: | |
yarn build # only if you use Webpack Encore | |
php bin/console cache:clear --no-debug --no-warmup --env=prod | |
php bin/console cache:warmup --env=prod | |
package: | |
sam package \ | |
--template-file template.yaml \ | |
--output-template-file .stack.yaml \ | |
--s3-bucket YOUR_CODE_BUCKET_NAME | |
deploy: sam deploy \ | |
--template-file .stack.yaml \ | |
--capabilities CAPABILITY_IAM \ | |
--region us-east-1 \ | |
--stack-name YOUR_STACK_NAME aws s3 sync public s3://YOUR_ASSETS_BUCKET_NAME --delete --acl public-read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment