Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BENderIsGr8te's avatar

Non-Laravel App Deployment

There are some great videos and dozens of blog entries online touting how awesome Envoyer is at deploying Laravel code. In fact I use it on a Laravel project I am currently developing and it is awesome.

I have a CodeIgniter App I have to make a lot of changes to over the next month to deploy. My old method of deploying when I made this app was to FTP connect and to manually upload files and pop open a database editor and hope I am making all the database changes I made a list of (as you can see, I was in desperate need of Laravel...side note, Laracasts is what taught me all about Migrations. Even though CI has migrations, I never used them because they seemed confusing).

One thing Envoyer is missing is really good documentation on how to deploy Non-Laravel apps. I read through all the documentation at https://envoyer.io/docs

I understand the challenge of trying to write code examples that can work with every single PHP app out there. But even a generic set of samples would be nice. I am hoping since @TaylorOtwell just finished re-vamping the amazing L5.1 docs that he may be willing to re-visit Envoyer docs.

I am not asking for CodeIgniter specific documentation to use on Envoyer. I am just looking for more Agnostic PHP documentation on Envoyer.

Ultimately Frameworks are popular, and I would be happy to (once I figure it out) make some documentation somewhere on how to use Enovyer with CI apps. Who knows, maybe Taylor only really wants Laravel apps in Envoyer so that it's easier to troubleshoot, after all it is just a side project for him. But if he is serious about PHP deployment for any app, it might be worth adding documentation specific to some of the other popular Frameworks. I'm not saying Envoyer needs to have a radio button for every framework you are using to deploy, but a "Frameworks" page on the documentation with short specific examples on how to setup/re-configure your app based on the Framework you are using might be beneficial to the growth of Envoyer.

Envoyer is the best thing since array slice (stole that from a Phils Sturgeon blog entry), I would love to be able to use it easily on my non-Laravel based PHP apps.

0 likes
10 replies
phildawson's avatar

Always up for better documentation but isn't it just the same process? The only change when I deploy say a Wordpress site through Forge is to edit the Deploy Script to remove the composer and artisan migrate lines which aren't needed.

BENderIsGr8te's avatar

My site isn't managed via Forge. I am deploying to an EC2 instance.

All in all the documentation isn't bad. But there is room for improvement.

Problem 1 - The Envoyer IP Addresses listed in the documentation aren't correct...at least when I whitelisted them for port 22 on Amazon they didn't work. I had to disable port 22 firewall completely before it worked.

Problem 2 - There is no documentation about blade syntax for Hooks. I happen to see in the video that you get to the current release folder by doing cd {{release}}. If I hadn't watched the video I would not have known that. If there are any other special blade variables we should know about they should be in the documentation (and at the very least release should be mentioned).

Problem 3 - I am not sure what Composer is doing. Composer runs and says "Skipping Composer Install". I am not sure why. I tried it several times. Composer is in my PATH so you can just run composer command and it will work. But to be safe I even tried putting the full path to composer in the server settings on Evnoyer and the message was the same. I ended up making a post-composer update hook that ran composer install --no-dev. That post update hook works great. So this is a hack, but at least my composer is updating.

Question 1 - Does composer run with the --no-dev flag by default? I think it doesn't. On my other site I had to remove a bunch of require-dev options before deploying because they kept trying to get pulled in.

Enovyer is still the bees knees. But some better documentation would be nice :)

At least for now, I have band-aid my deployments to work properly.

2 likes
aaemnnosttv's avatar

@BENderIsGr8te I was having this issue too. I reached out through the Envoyer support and got an answer from Taylor himself.

He said:

The install will be skipped if 1) a vendor directory already exists in the project or 2) the composer.json file is missing.

In my case, I had a single file that was preventing the command from running: vendor/.gitkeep. Removing this file from my repo fixed the issue.

Taylor also confirmed that at current there is no way to choose the flags passed to composer install, although I'm not sure what they are at the moment. Standing by on that one.

3 likes
aaemnnosttv's avatar

Just a follow up here. It seems that it may be running a bare composer install as Envoyer is installing dev dependencies.

I would imagine support for controlling the flags that are passed to composer would be rolled out eventually, but for now, the only options seem to be:

  • Run composer again after the Envoyer deploy hook, passing the flags I want. This is not ideal though, particularly because I have a bit of a timely script that runs on the post-install-cmd composer script, which I'd rather not run twice.
  • Disable Envoyer's composer hook by including a vendor/.gitkeep in my project, and then setup composer how I want it to run on the before/after deployment hook.

Really liking Envoyer, but it would be nice if it had a few more features, and some little more documentation.

1 like
BENderIsGr8te's avatar

I submitted a support ticket to Taylor a few days ago and he said he's going to add a flag to disable the automatic composer install per project. This way you can simply tell the app not to automatically run the composer install and instead you can use one of the hooks to manually run Composer with any flags or options you would like. This would allow maximum flexibility in that it allows sites being deployed to staging servers that may still want the dev dependencies installed to use them while sites deploying to production may not.

Sebastiaan's avatar

Lol, was just asking myself the same question :)

Did as was mentioned here and just added a new "before" hook on "Install Composer Dependencies" that installs my packages (including dev since it's a staging server). The hardcoded composer install script gracefully skips installing the packages a second time.

Sebastiaan's avatar

@rephiscorth No, just added a new hook and the hardcoded composer install doesn't run when it finds a vendor dir. Just has to be a before hook, that's all. So you could also disable the composer install by manually creating a vendor dir before it's run ("mkdir vendor" in a new before hook for example).

Please or to participate in this conversation.