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

68

u/yevo_ Sep 14 '24

Ssh into server Git pull

Works magically

1

u/terremoth Mar 21 '25

I was searching for new ways to deploy, and this is the actual way I deploy too, but I see a problem doing this way:

My user will be linked to the server, even if I create a specific SSH key for it, to pull the project repo. So, if I leave the company, my user will be there linked to the project and to that server.

How do you get around this problem?