deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.63k stars 1.49k forks source link

Docker compose as deployment target (recipie) #3362

Closed acirulis closed 1 year ago

acirulis commented 2 years ago

Hello,

I have a Symfony app which runs inside Docker containers on remote VPS with docker-compose script. I am currently going through Symfony recipe, and it seems that everything can be re-rewritten to support containers. For example, set('bin/php', 'docker exec container_name php'); , etc. Other approach would be to forward SSH port and let deployer do its work directly inside container(s).

Are there future plans for official container support? If not, which approach you would recommend following? I am also wondering if it would be possible to setup truly empty VPS, without docker containers already running.

Thanks!

bgmastermind commented 2 years ago

I've just attempted something similar, but with laravel. The port forwarding option for container ssh should be a working solution, but I did not want to go that way. I couldn't get it working with the first option. Tried with bash -c , tried with exec -t tried creating custom task that executes before deploy, but it just hangs after connecting to the container. So a good reliable solution for containers would be great.

antonmedv commented 1 year ago

Well, i think this is beyond scope of deployer for now.

Bilge commented 1 year ago

If this isn't in scope, Deployer is waiting to die.

antonmedv commented 1 year ago

I’m working on a new recipe for docker-compose right now. Will be in future versions of Deployer.

Bilge commented 1 year ago

Will be interesting to see what you come up with. In the meantime, perhaps this issue should be reopened until you're done?

antonmedv commented 1 year ago

No need to to. I have my own bookeeping preferences.

jeykodev commented 1 year ago

@antonmedv Do you have a rough schedule for us?

antonmedv commented 1 year ago

@jeykodev can't tell right now.