Create a Laravel application

February 20, 2020

The tutorial assumes that:

  1. You already built your application code into a Laravel image
  2. You have at least one running deployment that is part of the same project as the image

Create a Laravel application #

Once the source code of your application has been built into a Laravel image, you can use the image to install your application on your deployment. To get started, head over to your team's deployments page and find the deployment on which you would like to install your application. Hover the button in the right upper corner of this deployment and click Create application.

Deployments page

This will open a form similar to the one on the screenshot below. The first thing you need to do in this form is provide a clear distinctive name for your application. Thereafter, you need to select the type of the application that you want to install, which is Laravel.

Create Laravel application

Next, a select field will appear that contains all the Laravel images that are part of the same project than the deployment on which are installing the application. Here, you should select the Laravel image which you just created.

Create Laravel application

In the subsequent step of the creation process, you can specify any sensitive information such as passwords, SSH keys, or credentials that your application needs but that you don't want to store in your git repository. Smoothy will then securely pass the information to your application at runtime as environment variables.

As shown on the screenshot below, environment variables should be defined using the format KEY=value. To learn more about environment variables, you can read the section understanding environment variables in this documentation.

Create Laravel application

In the last step of the creation process, you are asked whether or not your application is a stateful application. By default, the deployment will not retain any data that is stored in your Laravel application. This means that whenever you release a new version of your application, the contents of the storage/ folder will be gone. If you do want to retain the contents of the storage folder, you should enable the option Persist storage.

Create Laravel application

When you completed all the steps in the creation process, you should see your new application appear on the deployments page. As shown on the screenshot below, there is a small grey spinner icon at the lower right corner of the Laravel logo. This indicates that the application is currently being created. After about a minute, the application is up and running and the icon turns into a green check.

Application is creating

When you click on the application in the user interface, you land on the application page where you can inspect and manage all the details of your application.

Application page

Where to go from here? #

Now that you have installed your Laravel application on your deployment, it is time to expose it to the worldwide web.

Michiel Kempen

Michiel Kempen

A passionate cloud engineer who helps software companies adopt modern cloud technologies through an intelligent all-in-one cloud platform called Smoothy.