How to automate - Composer & FTP

Hi, I have PHP app with composer libraries and only FTP connection to server. How can I automate this process please?

I saw this manual - https://buddy.works/guides/php-composer

But I am not clever from that. I already have a BitBucket repository and adding Buddy GIT hosting is duplicating that repository.

Could anyone help me, please?

Hello there and welcome to Buddy!

What you need to do is select Bitbucket as the Git hosting provider when creating the project. Buddy will attach a delivery pipeline to your repository and will fetch the changes for deployment, there’s no need to use our Git hosting.

Here’s a tutorial with a step-by-step guide how to create a delivery pipeline for PHP: https://buddy.works/docs/quickstart/php

Please mind it involves running Composer on the server over SSH, so if you’re limited to FTP, you might want to try this deployment method: https://buddy.works/guides/5-ways-to-deploy-php-applications#2-deploy-repo-with-dependencies-and-artifacts

In case of any questions, we’re here to help :slight_smile:

1 Like

Thank you very much Mr. Kus. I see that’s really easy. The only thing I am struggling now is loading own composer libraries, which gaves me this error:

[RuntimeException]
Failed to execute git clone --mirror …

remote: Invalid username or password
fatal: Authentication failed for …

I’ve try that with this guide but without success:

I’ve created a private SSH key with Buddy helper.

But still have an error for this command:
composer install --no-dev --optimize-autoloader --no-interaction --no-progress --no-scripts --prefer-source