Can't deploy CakePHP CMS to Beanstalk - cakephp

So I have this CMS I was to generate for an existing DB and I did that with Cake, literally mindlessly baked it out and now I've to deploy it to Elastic Beanstalk but for some reason I can't get it done.
The official documentation states I should be able to zip the root folder excluding vendors and upload the zip to EB and it should all magically work. Now I'm new to Cake, but I did do the same deployment with Laravel and it was much more than that. I can't seem to find any info regarding what's happening so I turn to you for help.
So when I do follow the instructions and zip the thing and upload it get "Instance deployment failed to install Composer dependencies specified in 'composer.json' in your source bundle" and the deployment fails. So my next step was to use gitlab-ci.yml and I managed to deploy the project to EB, but of course when I go to the link all I see is "An Internal Error Has Occurred." and when I visit the logs I got a bunch of "No such file or directory" errors.
My first wonder was I run cake locally with "bin/cake server", and I'm assuming EB doesn't ? I'm pretty new to Cake and I've never done anything with cake+eb so I'm wondering if anyone has any hints ? Thanks :)

Related

Github-Pages deployement issue

I have worked on an organization whose entire account was deleted by mistake but was later restored. Now I am trying to deploy a project in this org with gh-pages. Everything works or seems fine like to commits and all, unless I try to deploy the project. When I run the command npm run deploy the feedback I get is "published". But when I go to github and look for the website it says Error 404.
I have looked into the deployment log and found
this
I have tried every possible way to deploy a project using gh-pages and I have followed its procedure carefully. I found nothing useful which can solve this issue.
Thankyou in advance.

React-snap build fails unless build folder is uploaded to server

I'm using ReactJS and need some help with the build.
I am hosting a static site on a dedicated server.. in order to process that site I currently run my build locally and upload the 'build' folder to the server.
I've recently decided I should probably generate some static files for SEO (and adsense approval) and therefore I've added react-snap.
I run npm run build from my directory, and react-snap runs postbuild as expected however it fails unless I upload the build to the server first and then run the same build again to generate the static files (and then have to upload these again to the server for the static content to be available for search engine crawling).
I'm obviously missing a fundamental step in my build process here. I already want to refine it to a Git and push that to the server but I don't think this will help my react-snap problem.
Can anyone help?
Answering my own question for anyone with this problem...
My production variable for homepage was set specifically to the domain.. this is not required and does not allow for local crawling of the site. Explanation here:
https://github.com/stereobooster/react-snap/issues/153

Firebase Hosting deploy with Google Cloud Build throwing "No such file or directory" error

I built a simple ReactJs app and tried using Google Cloud Build to deploy it as soon as I push a new commit to the master branch on Github.
For that I added an "On push to master" trigger and followed every step from here to configure my Google Cloud and Local Project. In the end I created a cloudbuild.yaml file with the following content:
After a new commit and push the cloud build logs a correct npm install and npm run build, but the firebase stops at the following step.
I didn't understand which file/directory is missing, nor how to fix it. Could anyone help me a little?
Thanks in advance.
So after a whole day of work I found out the problem. Apparently when you generate the firebase image mentioned in the tutorial all its files need to use End of line LF, but in windows it sets all of them to CRLF. I solved the problem using the WSL terminal in windows.

Error "Mac is invalid" sometimes happen in Laravel project use AngularJS

I'm using Laravel 5.8 to create an admin system to manage data for my team.
My project is deployed on a VPS use Centos7.
The problem is that, i have deployed many projects on this VPS and they work OK. But with projects used AngularJS or Axios, when i send a request to server, i get error massage "The Mac is invalid!". But these errors do not always happen, just sometime (about 50%).
I have search and follow some instructions like Laravel - DecryptException: 'The MAC is invalid', but all not work.
I have cleared all my cache, rm bootstrap/cache/*, php artisan optimize:clear, check my .env file, setup new project with new ENV_KEY. But none of them work.
Can anyone give my some advises. Thank you!
I had the same problem, but that happend because i was using my HASH in production that was generated in development by the function encrypt()

it gives an alert on eclipse : Unable to Update : appengine-api-1.0-sdk-1.5.0.jar (Access is denied) when deployed to GAE

I am unable to deploy my application to google app engine however I can deploy it when I try 2nd or 3rd time. I get an alert on eclise as well as the log on console as below:
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: 'C:\DOCUME~1\bg92344\LOCALS~1\Temp\appcfg2387862893654282649.tmp'
Scanning for jsp files.
Compiling jsp files.
Scanning files on local disk.
java.io.FileNotFoundException: C:\DOCUME~1\bg92344\LOCALS~1\Temp\appcfg2387862893654282649.tmp\WEB-INF\lib\appengine-api-1.0-sdk-1.5.0.jar (Access is denied)
Debugging information may be found in C:\Documents and Settings\bg92344\Local Settings\Temp\appengine-deploy8040646126412995823.log
One thing that I found peculiar that when I go to Temp\appcfg2387862893654282649.tmp\WEB-INF\lib\ the jar appengine-api-1.0-sdk-1.5.0.jar dissapears after i get this alert, I guess it is not copying the jar completely. I dont know why :(
Can anybody help me out on this. Thanks in advance.
Regards,
BaleSabu
1 Login from Eclipse to your Google account (left bottom icon)
2 Check you application id before deploy. Should be same to your application.
3 Your user should have owner or admin role for application you want to deploy
Try cleaning and rebuilding your project before attempting to deploy again. Alternatively try to restart your IDE or computer. This fixed my errors in Android Studio.

Resources