I am working on deploying the app throught elastic beanstalk.
However, I have noticed that the config files are never ran, I know this by:
I have set a document root, when I go to settings throught AWS it is empty, I have set a environment variables which are also empty, however when it set it manually throught the website they are working fine, in event log (while deploying) I apparently should see output saying that config has ran successfully. I tried every log and it wasn't mentioned anywhere.
I am running Laravel 5.4 and .ebextensions folder is created in root of the project. Inside it I have 01-environment.config:
option_settings:
aws:elasticbeanstalk:container:php:phpini:
document_root: /public
memory_limit: 512M
aws:elasticbeanstalk:sqsd:
HttpPath: /worker/queue
aws:elasticbeanstalk:application:environment:
APP_ENV: production
APP_KEY: base64:MDKarorDueozTysvq50zDJET7es7MsVoTe3r001+xBs=
APP_DEBUG: true
02-deploy.config
container_commands:
01-migrations:
command: "php artisan migrate --force"
command: "php artisan key:generate"
command: "php artisan config:clear"
command: "php artisan config:cache"
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/99_make_storage_writable.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
echo "Making /storage writeable..."
chmod -R 777 /var/app/current/storage
chmod -R 777 /var/app/current/bootstrap/cache
if [ ! -f /var/app/current/storage/logs/laravel.log ]; then
echo "Creating /storage/logs/laravel.log..."
owner: root
group: root
content: |
#!/usr/bin/env bash
echo "Making /storage writeable..."
chmod -R 777 /var/app/current/storage
chmod -R 777 /var/app/current/bootstrap/cache
if [ ! -f /var/app/current/storage/logs/laravel.log ]; then
echo "Creating /storage/logs/laravel.log..."
touch /var/app/current/storage/logs/laravel.log
chown webapp:webapp /var/app/current/storage/logs/laravel.log
fi
if [ ! -d /var/app/current/public/storage ]; then
echo "Creating /public/storage symlink..."
ln -s /var/app/current/storage/app/public /var/app/current/public/sto$
fi
"/opt/elasticbeanstalk/tasks/publishlogs.d/laravel-logs.conf":
chown webapp:webapp /var/app/current/storage/logs/laravel.log
fi
if [ ! -d /var/app/current/public/storage ]; then
echo "Creating /public/storage symlink..."
ln -s /var/app/current/storage/app/public /var/app/current/public/sto$
fi
"/opt/elasticbeanstalk/tasks/publishlogs.d/laravel-logs.conf":
mode: "000755"
owner: root
group: root
content: |
/var/app/current/storage/logs/*.log
"/etc/httpd/conf.d/https_redirect.conf":
mode: "000644"
owner: root
group: root
content: |
/var/app/current/storage/logs/*.log
"/etc/httpd/conf.d/https_redirect.conf":
mode: "000644"
owner: root
group: root
content: |
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=307,L]
As you see I have redirect here also, which doesn't work as it always go on http by default, I don't get laravel log on S3 either or any other command. Anyone knows why?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ihVDCT
via IFTTT
Aucun commentaire:
Enregistrer un commentaire