Answer the question
In order to leave comments, you need to log in
How to properly deploy a laravel project?
Good afternoon, I'm interested in the question - how to work and deploy a laravel project correctly.
For example, now I am developing completely via FTP directly updating the changes on the site. But this is not relevant if the project is visited by many people and can see an error at any time during the update.
So, I have never worked with git and other systems. As far as I understand, development can be done locally, but I don’t understand how the database will then be pulled up (separately local and separate server or shared?). Also install git (version control system). Then work locally, and when everything is already tested, upload it first to git, and then somehow get all the changes on the server.
I tried to explain the problem as much as possible, I hope I succeeded. Thanks, have a nice day!
Answer the question
In order to leave comments, you need to log in
I just don’t understand how then the bd will pull upno way. why do you need combat data on the local area? It is enough to restore from a backup file from a combat server once a week/month. At you not so often tables change I think.
I am not professionally engaged in development, and even more so I am not familiar with Laravel. BUT
You develop locally, you also have a local database with fake data (Laravel has something like Facker Seeds), you change the structure through migrations. You write tests for each new feature using Composer.
You must have a repository with several branches, at least 2 - dev - master.
When you made a new feature on the local, push it to the dev branch, the changes fly away, let's say to GitLAb - the CI script is launched there, the tests are run, if everything is ok, then the branch with this feature is merged into the master, after which the hook and the production server are launched makes a Pull master, after which scripts for updating Composer dependencies, migrations, etc. are launched on the server.
Well, in general, something like this, I think the professionals will correct me, but in general, this is how development is carried out.
ps - you can also push all this into docker containers, if you wish.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question