Last active
December 21, 2021 10:18
-
-
Save jpswade/ec23575f8fe57e1666a8f4f681c9e5f1 to your computer and use it in GitHub Desktop.
Elastic Beanstalk Laravel ebextensions PHP YAML
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
# Set composer folder for this command and update | |
commands: | |
01-updateComposer: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update | |
option_settings: | |
"aws:elasticbeanstalk:container:php:phpini": | |
document_root: /public | |
composer_options: --no-dev --no-interaction --prefer-dist --optimize-autoloader | |
"aws:elasticbeanstalk:sqsd": | |
HttpPath: /worker/queue | |
"aws:elasticbeanstalk:application:environment": | |
APP_ENV: production | |
COMPOSER_HOME: /root | |
container_commands: | |
00-composer: | |
command: "/usr/bin/composer.phar install" | |
01-migrate: | |
command: "php artisan migrate --force" | |
cwd: "/var/app/ondeck" | |
leader_only: true | |
02-download-node: | |
command: "curl -sL https://rpm.nodesource.com/setup_12.x | bash -" | |
03-install-node: | |
command: "yum -y install nodejs" | |
04-npm-install: | |
command: "npm install --save-dev cross-env" | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/99npm-run-prod.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
cd /var/app/current/ | |
sudo npm run production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment