Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage multiple distant sites, but a single one for development #18

Open
zessx opened this issue Sep 13, 2018 · 0 comments
Open

Manage multiple distant sites, but a single one for development #18

zessx opened this issue Sep 13, 2018 · 0 comments

Comments

@zessx
Copy link

zessx commented Sep 13, 2018

In a lot of situations, you'll have a staging and a production website on the same server.
Trellis only supports this by using multiple keys in your wordpress_sites (@see https://discourse.roots.io/t/staging-and-production-on-same-vps/2440/23), so you'll end with 2 environments:

# groups_vars/development/wordpress_sites.yml
wordpress_sites:
  domain.tld: ...
# groups_vars/production/wordpress_sites.yml
wordpress_sites:
  domain.tld: ...
  staging.domain.tld: ...

Working like this makes it impossible to push/pull from and to the staging site, as our development environment does NOT have the staging.domain.tld.

We already are able to target the distant couple env + site, but we should also be able to target the local site, to makes these migration possibles:

  • PULL development:domaint.tld << production:staging.domain.tld
  • PULL development:domaint.tld << production:domain.tld
  • PUSH development:domaint.tld >> production:staging.domain.tld
  • PUSH development:domaint.tld >> production:domain.tld

As this behavior is not the default one, I suggest to make this local-targeting thing optional:

  • Without local target specified, search for the same site key
  • If this key is not found in the development environment and ONLY if there is a single site key, use it as the default one

What are your thoughts on this feature?
As we need it for our servers, we maybe will work on it in the next weeks, but any help would be greatly welcomed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant