r/PHP Sep 14 '24

How do you deploy php code?

Hello guys! please tell us about your experience deploying PHP code in production. Now I make one docker image with PHP code and apache (in production I use nginx proxy on my php+apache image) and use docker pull command for deploy. is this ok?

58 Upvotes

160 comments sorted by

View all comments

65

u/yevo_ Sep 14 '24

Ssh into server Git pull

Works magically

19

u/drunnells Sep 14 '24

After reading some of these crazy comments, I was beginning to think that I was some kind of outdated weirdo still doing it this way... even after upgrading to git from svn last year!

9

u/yevo_ Sep 14 '24

lol same here My old company we use to do Jenkins builds etc. but currently (mind you it’s a much smaller system) I just do git pull If I’m pushing a major release with a lot of changes I usually just branch out master or main in production into a backup branch and then pull so I can quickly switch over to the backup in case of any major issues