debops-wordpress icon indicating copy to clipboard operation
debops-wordpress copied to clipboard

git push production master

Open cezarneaga opened this issue 8 years ago • 5 comments

has it ever been in any of your plans? I think it would be really amazing if we could use git to push code changes to server. if there'd be a bucket list, this would me my drop. :)

cezarneaga avatar Sep 15 '16 13:09 cezarneaga

Something like this already exists in DebOps - check out debops.gitusers role. With it, you can configure an user account with git-shell as a default shell and use a set of (currently) Bash scripts to manage the contents of that account. I can hold multiple git repositories, use jekyll to deploy websites to specific directories, etc. Think of it like a basic GitHub Pages alternative. I plan to update that role at some point and expand it to a user-side hosting management of sorts.

drybjed avatar Sep 15 '16 13:09 drybjed

I want to support different deployment methods. @schrapel has a ticket for improving the setup with Rocketeer. I have one for bedrock (Capistrano). I'd like it to support a githook like setup too. Just a question of getting the rest of this stable and then we can work on features like these next.

carlalexander avatar Sep 15 '16 16:09 carlalexander

If you use bedrock / sage-9 look at this https://github.com/schrapel/debops-wordpress-deployer

tobeycodes avatar Sep 15 '16 19:09 tobeycodes

I started working on a WordPress project template based on @schrapel's work. Right now, I'm trying to smooth out the process of setting this up to a few config options.

On the DebOps side, the user stuff is pretty much done. I'm still thinking about how I can generate a wp-config.php without installing WordPress. I kinda wish wp-cli let us do that without having WordPress installed already.

Once I have a basic WordPress installation working, I'll work on getting bedrock working. This is going to need some extra roles to happen. I'd rather get this simpler use case working first.

carlalexander avatar Jan 08 '17 04:01 carlalexander

Alright, this is feature complete now. I still need to write the documentation for this and the template project. In terms of config, you just need these two options:

wordpress__root: '{{ wordpress__nginx__www }}/{{ wordpress__domain }}/current'
wordpress__user_allow_remote: True

wordpress__user_allow_remote allows someone to connect remotely to the WordPress system account. By default, it'll upload your loaded SSH keys like debops.bootstrap does for your system account. It'll also generate a SSH key for the system account that you can configure as a deploy key.

You can just run DebOps as usual. Once that's done, the WordPress project template now has a setup task to migrate a normal WordPress site to one that's ready for deployer. I got inspired to do something like that because Capistrano always had a project setup command. Don't see why we couldn't have too! 😝

So you just need to run these two commands and you're good to go:

$ dep setup
$ dep deploy

So that's it! I think that's easy enough. What do you think?

carlalexander avatar Jan 10 '17 04:01 carlalexander