Comments (7)
Windows Bash acts different because it emulates the UNIX CLI, but the filesystem is still turned upside down. Use Ubuntu on Windows 10 from the Store to access the files and chmod them: https://www.microsoft.com/store/productId/9N6SVWS3RX71
from laravel-aws-eb.
Resolved by using .ebextensions rather than .sh hooks
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
- namespace: aws:elasticbeanstalk:container:php:phpini
option_name: document_root
value: /public
- namespace: aws:elasticbeanstalk:container:php:phpini
option_name: memory_limit
value: 256M
commands:
00_php_ini_bak:
command: cp /etc/php.ini /etc/php.ini.bak
01_install_pecl_redis:
command: |
pecl install redis
echo "extension=redis.so" | tee /etc/php.d/50-redis.ini
test: "php -r \"exit(extension_loaded('redis') ? 1 : 0);\""
02_install_pecl_ev:
command: |
pecl install ev
echo "extension=ev.so" | tee /etc/php.d/50-ev.ini
test: "php -r \"exit(extension_loaded('ev') ? 1 : 0);\""
03_php_ini_restore:
command: cp /etc/php.ini.bak /etc/php.ini
container_commands:
01_copy_env_file:
command: |
touch .env
echo "APP_ENV=beanstalk" > .env
chown webapp:webapp .env
02_chmod_folders:
command: |
chmod -R 777 storage/
chmod -R 777 bootstrap/cache/
mkdir storage/framework/cache
mkdir storage/framework/views
chown webapp:webapp storage/logs
chown webapp:webapp storage/framework/*
03_install_composer_dependencies:
command: |
/usr/bin/composer.phar self-update
php /usr/bin/composer.phar install --no-dev --no-interaction --prefer-dist --optimize-autoloader
04_link_storage_folder:
command: php artisan storage:link # not needed as we are using S3
05_systemctl_restart_nginx:
command: systemctl restart nginx
from laravel-aws-eb.
Another question...
2020/05/17 22:03:01.905016 [ERROR] An error occurred during execution of command [app-deploy] - [Install composer dependencies]. Stop running the command. Error: Installing composer dependencies failed with error: Command /bin/sh -c composer.phar install --no-ansi --no-interaction failed with error exit status 1. Stderr:Do not run Composer as root/super user! See https://getcomposer.org/root for details
Within 01_install_composer_dependencies
you are installing dependencies as root which is not recommended, right?
from laravel-aws-eb.
Hey!
According to this: #6, sudo should be used to avoid any errors regarding the install.
The errors related to .platform/hooks/prebuild/update_composer.sh: permission denied
are because you didn't make the shell scripts executable before deploying them:
- https://github.com/rennokki/laravel-aws-eb#installation
- https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html (under Platform hooks):
All files have to have execute permission. Use chmod +x to set execute permission on your hook files.
from laravel-aws-eb.
Yes, this is a workaround. 👀
If you check the diff between master and amazon-ami branch, you can see that most of the commands were moved to .platform/ since i tought it is a good idea to make use of this AL2 feature. 😅
from laravel-aws-eb.
i made a posting in aws forum.
there are too many reasons for this problem. one of the reasons is deploying from a windows machine
from laravel-aws-eb.
Consider running the commands using WSL if you got Windows 10 or your CI/CD pipeline instead before deploying it.
from laravel-aws-eb.
Related Issues (20)
- Nginx conf is not loaded during self-startup command
- Error on Deployment HOT 1
- Error when I try to install php-redis HOT 5
- Queues HOT 3
- Mailparse package install HOT 1
- Node.Js failed HOT 3
- It begins to return error on npm HOT 1
- Cloudfront as CDN HOT 3
- Not an issue, just a thanks!
- No data after successful deploy HOT 2
- Database connection [postgres] not configured.
- Instance id(s) - did not pass health check after command execution. Aborting the operation. HOT 1
- "sudo npm run prod" fails with "Exited with error code 243" HOT 7
- .platform/hooks/prebuild/configure_php_ini.sh: no such file or directory HOT 2
- Command start_cloudwatch_agent failed HOT 2
- Please add installation for Laravel Octane
- cloudwatch agent fails because laravel_logs.json file is not found
- Laravel Octane Support (2023) HOT 1
- There is no existing directory at "/var/app/staging/storage/logs"
- Deployment Errors on the new Amazon Linux 2023 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-aws-eb.