Provisioning multiple apps efficiently?

Published 3 months ago by keyur

I need to create multiple applications often, and wondering if there is an easy way to repeat the installation of many basic packages and steps that I do in all of them.

i.e. install

  • debugbar
  • collective
  • shopify api

Would creating my own custom package be able to handle this?

Thanks.

jlrdw
jlrdw
3 months ago (156,190 XP)

As long as your composer file has everything needed you should be good to go.

Snapey
Snapey
3 months ago (519,655 XP)

Yep, as @jlrdw says, just keep a copy of composer.json that has what you need in it.

I use Tighten/Lambo to kickstart a new project https://github.com/tightenco/lambo/blob/master/lambo which is a script to setup a laravel project and initialise Git etc.

It should be easy to fork this and edit it to pull in your master composer.json then run composer update.

jlrdw
jlrdw
3 months ago (156,190 XP)

Just bear in mind that a lot of software has updates so often you're going to have to keep that composer file updated as needed. Unless you plan on using a specific version each time.

keyur

Thanks, what about adding entries for each composer package into config/app.php?

For each package, I usually have to make 1-2 entries in that file.

Also, publishing config files, such as for debugbar?

Snapey
Snapey
3 months ago (519,655 XP)

the lambo script adds entries into .env

that might offer some ideas?

keyur

I will probably go down the Lambo route. But our of curiosity, could I create my own package that does all the necessary bootstrapping of the third party packages?

Sign In or create a forum account to participate in this discussion.