I developed application in laravel 5.2. I was using the Virtual host on local and pointing publice/index.php easily.
But on production why we need to using the put index.php & all stuff out of public folder. Is this best practice to deploy on production?
I copied whole in project folder and public folder stuff copied on the root(public_html) of server.
I changed the index.php accordingly and its working fine.
require __DIR__.'/project/bootstrap/autoload.php';
$app = require_once __DIR__.'/project/bootstrap/app.php';
Issue is When i use auto deployment tool, It pushes whole code in project folder. Every time I move assets by ssh from project/public/assets to root/assets manually.
Main Issue I am also facing issue, saving profile picture in assets folder. But it save picture in project/public/asset instead it should in root/assets. I am really confused on this issue too.
Advise me Please recommend me the best practice, where should i keep public folder stuff and how to manage auto deployment.
Can we keep index.php inside public and point directly index.php here. In this way auto deployment work fine.
Issue in after deployment commands I am using DeployHQ.com to deploy my code. It execute ssh commands, but unfortunatly my command doesn't work because artisan file is inside of root/abc/project folder. I dont know where this shell execute commands. or How to point project folder directly to execute these commands.
Bitbucket webhook return 422 error code I am using bitbucket webhook on approve event. I have given it deployment url and auto deployment is switched on. Hook triggerred as well, but it didn't deploy any thing, It shows error code 422 and error "Could not decode the deployement".