Envoyer and Forge also use git, they just make it super easy. The only disadvantage of using git without one of these services is that it can be time consuming and difficult to have zero downtime (which Envoyer can achieve). You have to manually set up your server, maintain it yourself, ssh into it if you want to pull in a new version etc. Its totally doable (I do it for several sites) but it can take a lot of time, especially if you've never done it before.
How to Deploy Laravel project on VPS and How to manage changes?
Hi,
I'm using Windows with XAMPP when developing web applications (with Laravel). Also, I use Git for version control. When I finish a project, I'll have to deploy it on VPS (LAMP). How do you do it? For now, two ideas come to my mind:
-
SFTP - For example, I would use MobaXterm's Graphical SFTP browser, I would just copy my project (files)... and then I would import MySQL database (or run migrations).
-
Git/GitHub - on my VPS I would install Git and then I would:
- create a remote repository on GitHub (should it be private?)
- git push (from localhost to GitHub)
- and then, on VPS, I would do git clone (from GitHub to VPS)
- finally, I just need to import MySQL database (or run migrations).
Do you work in this way, or there is a better solution? I suppose that the second way (Git/GitHub) is better than the first (SFTP) because if I have to add some new features or fix bugs - all I will have to do on the server is: git pull (from GitHub).
EDIT:
Now I see that there are services such as envoyer.io and forge, but they are not free. So, what are the disadvantages of the second way (2. Git/GitHub) that I described in my question, which is free?
Please or to participate in this conversation.