CodeIgniter Forums
Distribution and installation of CI4 application - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Distribution and installation of CI4 application (/showthread.php?tid=87638)



Distribution and installation of CI4 application - joho - 05-12-2023

I've searched the forum and seen some hints to other asking similar questions, but ... I'm not sure it fits my use case. Apologies if I've missed some replies/methods on how to accomplish this.

Scenario:

I have a CI4 application that I want to allow people to install in their own environment.

Their environment is bare and the only requirements I can place on it are PHP 7.x/8.x and a web server.

I would like this to pull down the expected/required CI4 version and then deploy the files that make up my application, possibly running migrations, creating databases, whatever.

I this possible by "simply" distribution a .zip or .tar.gz archive that contains everything, including my composer.json, *except* the actual CI4 files? So that when they run composer, it would pull down version x.y.z and place it in the appropriate directories/folders, possibly run extra migrations and/or ask for some configuration parameters?

I could, of course, simply create an archive with my entire CI4 application, including CI4 and be done with it. But this seems to be a bit counter productive considering the nature of Internet :-)

Feel free to tell me I'm way off base, I may not have thought this through properly.


RE: Distribution and installation of CI4 application - iRedds - 05-12-2023

You won't be able to specify the CI version as it will always install the latest one available for the particular php version.
You won't be able to use composer if it's not pre-installed.

You need an installer script in which you can implement all the Wishlist.


RE: Distribution and installation of CI4 application - InsiteFX - 05-12-2023

This is what XAMPP uses to install their software.

Bitnami


RE: Distribution and installation of CI4 application - captain-sensible - 05-13-2023

if you specify a Ci version in your composer.jason file ,which you uplaod as part of your system. tell people they will need to use composer- not that great of an issue me thinks then it is possible to upload a bare bones system , that you want people to use:

I think i can say that having done it : https://sourceforge.net/projects/codeigniter4cms/


RE: Distribution and installation of CI4 application - joho - 05-15-2023

Thanks for the comments.

I understand composer is a "base requirement", and I'm fine with that. I will need to specify a specific CI4 version since I want to make sure the application doesn't break due to changes in CI4 (although I don't see that happening in many cases at all).

I guess "the trick" is to create the directory structure and accompanying files needed only by my application, and then issue a "composer update" to "fill in the blanks" (i.e. download CI4 version x.y.z) and, possibly, have some additional installation steps.

The main point (which may be bad thinking on my part) was to avoid having to distribute the actual CI4 "package" with my app. But perhaps that's still an easier or better solution?