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

mkocansey's avatar

Deploying with Capistrano. Is there a better approach?

I am currently deploying my app with capistrano 3. Any time I deploy I need to run these 3 steps

  • rename .env.production to .env
  • run composer install since vendor folder won't exist
  • run php artisan key:generate

Is there a more efficient way of doing this? Is there no way to deploy and still maintain the vendors folder and .env file if I have already run the above 3 tasks and nothing has changed?

0 likes
5 replies
christopher's avatar

Work with Git and Forge - In my opinion it`s the best stack to deploy your laravel apps.

Just push your changes to your git repo and forge handles the rest for you. For production sites you can also use Envoyer.

mkocansey's avatar

Yea.. trying to skip the extra $10/m on either Forge or Envoyer. Capistrano works fine.. it's just the extra hustle of constantly running those 3 tasks after each deployment.

Please or to participate in this conversation.