Skip to content

{{ project_dir }} resolves to the local project directory in runLocal() #101

@jjsmclaughlin

Description

@jjsmclaughlin

In DefaultDeployer, {{ project_dir }} resolves to the local project directory when it is used inside runLocal(). This may be intended behaviour, but it makes it difficult to copy things to the release directory.

Consider the case of a public/build directory generated by Webpack Encore. I cannot install Webpack Encore on the production server, so I need to copy my public/build folder into the deployment from my local machine. So within beforeFinishingDeploy() I want to do something like:

$this->runLocal('rsync -r public/build/ me@remote:{{ project_dir }}/public/build');

But unfortunately in this case, {{ project_dir }} resolves to the local path of my project, making a nonsense command.

Could we have a {{ remote_project_dir }} available from runLocal()?

Even better, {{ remote_web_dir }}, {{ remote_bin_dir }} etc?

Perhaps you think that a sane deployment should not be copying things manually from the local machine to the server like this. But in that case I think you need to make DefaultDeployer support Webpack Encore managed assets, because this is a recommended solution now in the Symfony docs.

Thank you for considering this. I really like easy-deploy-bundle. It's a great relief not to have to use Capistrano any more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions