How to Develop laravel app without internet connection - php

In our company intranet we are not provided with internet connection due to security reasons. Is it possible to develop laravel application in such an environment? Is it possible to download laravel and all dependencies in a local server and serve the same to the development team?

yes, but first u need to make main (skeleton) Laravel project with all your dependencies(with internet), and after just make copy of skeleton project(without internet). Or u can try to install installer https://laravel.com/docs/5.8/installation#installing-laravel

Related

Installing and running Laravel and PHP without admin privileges on Linux servers

There is a need for developing a web application that will be deployed on a Linux server on which I won't have admin privileges and also the internet.
I need to deploy self-contend binaries or other files on the server. I need a way to develop and deploy a web application in such a restricted environment.
My preferred development stack is Laravel but I am open for any other framework which can be used to develop the application for such a scenario.
I can only answer on Laravel's behalf: Laravel alone requires only PHP binaries. It doesn't need internet, not even composer while in production mode. You can zip the entire application with fetched dependencies from another computer and deploy it anywhere you want.
As for other software, I'm sure you can download them as tarballs and install them as basic user without root privileges. Check out the PHP site for stable Linux releases: https://www.php.net/downloads.php

Deployment of php7 on appengine

I'm an absolute beginner on the Google app engine.
I have gone through the documentations for deploying a basic php app. The guidelines for deploying php7 apps aren't very clear to me.
Let's say I have a CMS written in php MySQLi. Assuming the project has privileges (in separate folders) for admin, users and guests, and I want to deploy it on Google app engine;
What are the configuration(s) that are most recommended for this option.
Asides the Google SDK, is there any GUI application that could help make the process easier?
Does the SDK also have version control on them? How do it update codes without re-deploying the whole project all over again?
For #1 you probably should go through Choosing an App Engine environment first. I can't help with more details as I'm not a PHP developer (which is also why I can't answer #2).
For #3 GAE itself only tracks versions at the entire service level, each deployment consisting of the entire set of the service's deployable artifacts.
However it may be able to skip unnecessarily uploading unchanged artifacts. I know it does it at least for python standard environment services if re-deploying from the same workspace, in rsync style. You can confirm this by increasing the deployment verbosity via the --verbosity option. I'm unsure if the fact that I was using git for the project mattered.
For the flexible environment services things are a bit more complex, since the deployment artifacts are docker images, see How can I speed up Rails Docker deployments on Google Cloud Platform?
If you'll have a multi-service app each service can be deployed individually, but a service deployment in itself is a complete one, not an incremental one, creating a new version of the service.
The app-level configs (applicable to all services) are individually re-deployable, without re-deploying any of the services:
To deploy the other configuration files of your service, you must
target and deploy each file separately. For example:
gcloud app deploy cron.yaml
gcloud app deploy dispatch.yaml
gcloud app deploy index.yaml
There is another way. The google console allows for mirroring of repositories withing the cloud service.
Locate "Source Repository", connect with you GitHub account and mirror a repository.
Its faster and easier if you ask me.

Cakephp 3.0 or > on Azure?

Is it possible to run Cake 3.0 or higher on Azure Web Apps? I have an app running locally on a 3+ version but when I installed CakePHP on my Azure web app it's running 2.5.1.
I feel like it's just a matter of uploading all of the newer files and the db created for the 3.0 version but scared there is some kind of write access the new cake will need thus preventing it from running and burning a ton of my time.
I started learning PHP 3 weeks ago so calling me a newb is probably an insult to newbs.
This article tells answered most of my original questions regarding this issue.
Yes, it is possible to deploy CakePHP > 3.0 applications to Azure Web Apps. But we need to some preactions to make the application to run. Generally, you can try to following steps:
Create an empty Azure Web Apps, and enable Composer extension, and also you can enable Visual Studio Online for easy script modifications and command running. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-git/#enable-composer-automation-with-the-composer-extension for more.
Create a file named web.config with the content at http://book.cakephp.org/3.0/en/installation.html#iis7-windows-hosts in the root directory of your application.
Add the inlt extension in PHP runtime on Azure. Add a folder named ext in your root directory, create a file ext.ini in this folder with the content:
extension=php_intl.dll. Add an App Setting to your Web App with the key PHP_INI_SCAN_DIR and value d:\home\site\wwwroot\ext. You also can do this step leverage Visual Studio Online extension after deployment. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/ for details.
Set up the development environment of your Azure Web Apps, deploy your CakePHP application to Azure via Git. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-git/#set-up-the-development-environment for details.

Setting up a Laravel 4 app on a VPS

I am trying to deploy my first Laravel App. So I hope I am providing all the necessary info. I have walked down several paths trying to deploy this app. I tried a shared hosting account, but found too many errors to continue deploying my Laravel app. In the meantime, someone has said to me I need a VPS, so I may go with that.
So with a new VPS, I now am trying to install the following: phpMyAdmin, node.js, Composer, and Laravel 4. These are the technologies I am using on my local server with MAMP. Now after being overwhelmed with the information on installing each on a VPS, I have found myself extremely confused. Some places say I need to install Ubuntu. Some say I need to install Apache first. Some talk about using CentOS. I honestly have no idea what I need to install, and in what order. All I really need is to figure out how to set up a PHP environment on my VPS with phpMyAdmin, Node.js, and Composer. After that I am pretty sure it's all straight forward, as far as installing my app.
I also saw some one talking about committing my app to Git, and the cloning it to the VPS. If I did this, I would still need to set up the environment correct? Once again, I hope I have provided the necessary information. If my question is not clear, could you please refer me to a resource that I can study.
You don't need install Laravel separately from the app it is part of - these days a PHP app just contains everything it needs in its vendor folder. How to deploy depends on how you have arranged your dependencies locally, but the simplest way is to copy everything in your local project to your remote server (FTP or rsync). I don't think Laravel demands a VPS, but if you are using Node as well, then yes you will.
So, the short answer is: if it works locally, copy it up to the remote host, and it should work there. Make sure you've set up your config system in your app so that it can cope with the different settings you need in local/remote environments, such as database connection settings.
My feeling is that a shared host would be easier for you as a beginner - is the Node.js component of your app critical? Running your own VPS is not difficult, but there is quite a bit to learn. Your distro (such as Ubuntu) would be ready-installed, and on top of that you would use the package system (something like apt-get) to install Apache, PHP, PHP modules, phpMyAdmin, git, and whatever else you need.
Yes, you can certainly deploy using Git. One way to do this is to create bare repositories on your server in a private place, set it up as a remote in your local dev machine, and push to it as your off-site copy. Then, from your dev or production web folders, pull and update submodules. This is not trivial, and requires at least a working knowledge of Git - so presently I wouldn't recommend this route.

Where to deploy symfony2 application

I have developed a symfony application and it's done.
It's been a couple of days and I can't figure out how to deploy this into a real apache server, when I copy it to the public_html it doesn't work assets don't load properly.
Can some one give me a step by step description of how to deploy it so that when I navgiate to example.com url I see my symfony application.
Thank you
If you try to deploy your application on a server, you have to configure apache. The best way its to make a virtual host.
Here the documentation:
http://httpd.apache.org/docs/current/en/vhosts/examples.html
http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
I would suggest using Capifony which provides a specialized set of tools on top of Capistrano, tailored specifically to symfony and Symfony2 projects. (according to the documentation)
The advantages of using capifony are,
deploying is as simple as running cap deploy from your project root directory.
It stores multiple releases.
It allows you to use SCM(s) to pull your application code down to the server.
You can configure it to run any batch command during the deployment.
It performs a transactional-like deployment process (if any step fails, the deployment is
rolled back and the current directory points to your last release)
You'll also need to troll through this part of the documentation to figure out how to get your application running under Apache.

Categories