I'm trying to automate the setup of my Symfony2 Application using the .ebextensions *.config files but its failing when I try to execute a chmod. This is my first time on AWS so I've hit a bit of a wall
Here is the config of my symfony.config file in .ebextensions:
container_commands:
01_chmod_cache:
command: chmod -fR 777 /var/app/current/app/cache
02_chmod_logs:
command: chmod -fR 777 /var/app/current/app/logs
03_db_migrate:
command: php /var/app/current/app/console doctrine:schema:update --env=prod --force
04_update_assets:
command: php /var/app/current/app/console assetic:dump --env=prod --no-debug
05_clear_cache:
command: php /var/app/current/app/console cache:clear --env=prod --no-debug
I can run all of those commands on CLI when I ssh in. When I review the logs I get the following which isn't very helpful Error occurred during build: Command 01_chmod_cache failed
I think it might have something to do with the user thats executing commands but I don't know where I can configure this
Can anyone assist ?
Cheers.
To change your environment's capacityOpen the Elastic Beanstalk console , and in the Regions list, select your AWS Region. In the navigation pane, choose Environments, and then choose the name of your environment from the list. If you have many environments, use the search bar to filter the environment list.
Elastic Beanstalk isn't great if you need a lot of environment variables. The simple reason is that Elastic Beanstalk has a hard limit of 4KB to store all key-value pairs. The environment had accumulated 74 environment variables — a few of them had exceedingly verbose names.
Maybe adding quotes to your commands will help:
container_commands:
01_chmod_cache:
command: "chmod -fR 777 /var/app/current/app/cache"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With