I’m going to go through the steps I use to set up a Laravel application in Runcloud. I’m going to assume that you already have a server instance setup and you are familiar with both Runcloud and Envoyer.
1. Once your server is set up, Go to the web application page and click on Create Web App.
2. Select Custom Web Application(PHP)
3. For Public Path use the following path – /envoyer/current/public
4. For the Web application stack to choose Native NGINX.
5. For the rest of credential fill these in as you normally would then add the web application to your server.
6. Now go to the database and create a new database and database user for your application. Make a note of these files has we will need them for Envoyer.
7. I am doing an SQL dump to import my data over as this is a new site. If you are using migrations you can do this when we have deployed your application.
8. Add a new Project in Envoyer and fill in your project information
9. Go to Server and add in your server credentials. Tick the Receives Code Deployments option in the input box the path to your server. This is the folder we specified when we were setting up our web application. To get the path ssh into your server directory up until the envoyer folder and type pwd something like the following should be returned: /home/myuser/webapps/helloworld/envoyer/. Update this Project Path and then save the server.
On an optional note I don’t tend to use FPM, so I go back and edit the server from Envoyer and untick Restart FPM After Deployments
10. We now need the SSH key, so from Envoyer make a copy of the provided SSH key. By clicking on the Key icon on the line of your server details.
11. Now back in Runcloud add the ssh keys to your application user.
12. Now on the server tab underneath Connection Status click on the refresh icon to see if your server is connected. If all goes to plan you should now see it change from unknown to successful.
13. Click on the manage environment button. Unlock your environment file and copy over your .env information into this screen. For your database information use what was added in step 6. Make sure the sync options are selected to sync the file to your server.
14. Now we should be good to go and deploy the server
15. If you need to migrate your database do this now, Now go to the site and fingers crossed your web application should all be working
Check the DNS settings have changed or change your host file to your server IP
SSH into your server to make sure the .env file as copied over
Double check the database information is all correct.