Skip to content

Instantly share code, notes, and snippets.

@thibaudlemaire
Created May 23, 2019 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thibaudlemaire/b25458bbc291adc38c9a8244f3423e8f to your computer and use it in GitHub Desktop.
Save thibaudlemaire/b25458bbc291adc38c9a8244f3423e8f to your computer and use it in GitHub Desktop.
Makefile for Symfony deployment on AWS Lambda using Bref
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