Skip to content

Deployments between two remotes / migrating between staging and production #2

@gaambo

Description

@gaambo

Look into how one could do a deployment from a staging host to a production host (ie between two remotes). This might be convenient if the staging site is on the same host as the production (but in a different directory) and the deployment (moving files part) should be really fast. The task would have to check if it's on the same server and it can use normal file copy or if it has to use ssh.
Some tasks (like replacing URLs etc.) should still run normally.

This could also work in the other direction (from production to staging) so creating a staging site and keeping it up to date would be easier.

Some things to consider:

  • How does SSH work if I SSH into a remote server and SSH from there into another one? How would paths be translated?
  • "Local" would then be the base server (in the original example the staging environment), but some things might still run on the real local device (like npm build tasks, if the server doesn't provide npm).
  • Does deployerphp provide something to handle this already?

Thanks to @marekbrze for the input on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions