I developed a desktop application in react and electronjs. And built an API with laravel, eveything works perfectly. The challenge I have is, how I can deploy and run my electron app locally without having to manually setup the laravel API.
I am looking for a way to have all of this setup and installed once. I checked out a couple of options and one of such is php-server but that wasn't still going to cut it.
Shell Scripting
I have thought about executing a shell script to create the server instance pull my laravel application from github, set it all up on docker.
The challenge is, if any of my users run docker ps they would see all the processes running on my docker instance.
A possible solution would be isolating docker so it's not accessible globally but only within the application.
I don't know how to achieve this.
If this is achievable please drop some guide on how to achieve that or maybe suggest a better way to handle my current situation.
Related
I have created an administrative system for libraries which basically lets you register books, users, borrowings and all kind of stuff that happens in a library. To code and test it, I used XAMPP, in my own PC, using Apache PHP and MySQL to structure and develop the application.
It works, and has a very complete and efficient set of functions and utilities, that is why I plan to implement it in my school's library, that for years has been using Microsoft Excel as a tool to organize all the books and students.
The thing is: I don't understand how to setup this app as a local web application. The idea is to install the folders and files in the library computer so it can control the system locally and through a browser (using localhost to access the PHP application).
I know it is possible to simply install XAMPP manually and copy the folder to htdocs and then use it normally, but I want to eliminate the manual part, and have some sort of setup that lets any person install the app without having to understand how Apache or MySQL works.
Does anybody know what could I do? I have though of creating a series of batch files (the library PC uses Windows) and move folders, create shortcuts, etc. using normal cmd commands. It would be a better alternative, but still the user would need to go through XAMPP (or some other service) setup prompts.
Thanks very much
you can create a bash file to automate this process.
I am working on development of a web app (for learning) in Laravel and I`m using Bitbucket for source control. It will be deployed on couple servers (20 or so, perhaps more over time), and I would like to be able to update all of them as the app changes over time.
The problem is that I will not have SSH access to most of those servers so I wont be able to use a simple "git pull" (a server we test on does not even have git installed so shell_exec is not an option also).
My plan was to make a script that will download latest zip from Bitbucket server, unpack it overwriting the old code, and then running a Laravel script to run migrate (for eventual database changes).
Is there maybe a more sensible way of doing this?
What are you looking for is CI/CD, i.e. Continues Integration/ Continues Delivery. There are so many ways to automatically deploy or pull a code over server. You can use following methods
Automating Deployment to EC2 Instance With Git
Using Bitbucket for Automated Deployments
CI\CD workflow with BitBucket Cloud, Bamboo, AWS CodeDeploy
Bitbucket - Manage Web Hooks
Apart from this you can find so many articles on this, but if you wants to automate the process at laravel level then use Laravel Envoy
I know this is very wrong. I have a project running on node on Heroku. I have a php script that is long and complex and I don't want to rewrite it. I was going to setup another server but that would cause some CORS/XSS problems.
My question is, is it possible to run a small php script in Node on Heroku?
I know this is bad practice but it is a one time thing.
You cannot do this by default, because when you deploy a node app you'll be using the Node buildpack from Heroku. What you can do instead is this:
Write your PHP script as a web API, and deploy this to it's own Heroku app. Then, in your Node app, make an HTTP call to your PHP API on Heroku so it does what you want =)
I have a Laravel web app that is ready to be deployed for production. What I want to do is to clean the code and build the package before pushing it live. All the css and js files need to be combined into one and minified.
I expect Laravel to have something like grunt build when developing with NodeJs and AngularJs, but seems like there's not.
Does anybody have done this with Laravel before?
The next version of Laravel, Laravel 5, will have gulpjs support built into it. As for now, Laravel, doesn't come with any css/js build tools. In my applications, I install gulpjs into the app folder using npm install gulp. From there I can just run gulp as part of my build process.
Laravel does not by default come with a development environment in regards to CSS, JavaScript, and other frontend stuff. Therefor, it won't come with a Grunt setup out of the box. You'd have to build your own.
Here is a nice article about doing this: http://blog.elenakolevska.com/using-grunt-with-laravel-and-bootstrap/.
Laravel homestead comes with some of these software bits and pieces already installed, but not configured.
I am running a PHP Project (Drupal-Multisite-Enviroment) on Azure web-role with WindowsAzurePHP SDK. Everything works pretty fine. Now I want to implement continuous-integration with TFS and i am wondering, if anybody has ever done it before, because i can't find any documentation about it.
I understand that the deployment process on Azure is connected to the build process on TFS. But what is the output of that azure-specific build-process? The deployment package *.cspkg and ServiceConfiguration.cscfg?
If so, do i just have to make a custom Build, that moves PHP files to a temp folder, calls the Azure SDK package-batch and pushes the package to Azure cloud afterwards?
I would appreciate it if you would share your experiences with me.
I have not done it before but yes... If you set your solution to build in Team Build you should get the Azure specific output only.
The easiest to get your PHP into the right place is with a pre or post build PowerShell.
https://github.com/tfsbuildextensions/CustomActivities/blob/master/Source/Scripts/GatherItemsForDrop.ps1
You should be able to use this PowerShell after build to put together your PHP with your azure bits that just got built.
Then create a post test PowerShell to deploy to Azure.
You can set PowerShell scripts to run by editing the build definitions and on the process tab opening the "advanced" sections.
Note: Make sure that you are using DefaulTemplate.12.xaml.