Answer the question
In order to leave comments, you need to log in
Git on a production server?
The current situation with updating the production server is tormenting me.
At the moment it looks like this -
- development in a separate branch, push to the production branch
- go to the server (or through factories) do git pull, roll migrations if necessary, and collect statics.
But if something goes wrong, then the server is down, users complain, so I'm doing everything wrong.
I already thought how to do everything with archives, but it’s absolutely not convenient, plus migrations still need to be rolled.
Question - how do you update the application on the production server and how do you make database migrations painless?
Answer the question
In order to leave comments, you need to log in
Convenient for using Capistrano. I can't judge for others. closely only worked with this system. Release versions are stored on the server and, if necessary, you can quickly roll back the code. Also, with each release, you do not need to go to the server and do a pull.
There is such a wonderful thing as CI (continuous integration). I use TravisCI myself, great solution. Musthave for the modern developer.
for simple projects, it’s perfect for example https://github.com/deployphp/deployer
there is also https://github.com/REBELinBLUE/deployer
well, or different pipelines in gitlab / bitbucket, but there you need to bother a lot more
I already thought how to do everything with archives
I usually deploy to www-dev first, and then www. www-dev before each deployment is fully synchronized with www, including the database. Accordingly, before deployment, you have 2 absolutely identical projects. You check everything on one, and then - Let's go!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question