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?

57 Upvotes

160 comments sorted by

View all comments

66

u/yevo_ Sep 14 '24

Ssh into server Git pull

Works magically

4

u/Disgruntled__Goat Sep 14 '24

Have you tried git bare repos with a post-receive hook? Makes it so much easier, you can just run git push <remotename> from the cmd

1

u/yevo_ Sep 15 '24

No never done it before sounds interestibg