Neos distribution download through command

We have below options for downloading Neos distribution.
Is there any behavioral change among the below command, guide us if any and which one is favorable for Production mode?

php composer.phar create-project –no-dev neos/neos-base-distribution Neos
php composer.phar create-project neos/neos-base-distribution Neos

Thanks

php composer.phar create-project –no-dev neos/neos-base-distribution Neos

Will install a fresh Neos project folder without all the development dependencies (See https://getcomposer.org/doc/03-cli.md#create-project). So if you’re not going to work actively on this setup and just install more packages, this can be used to keep the amount of packages downloaded small. On a Production setup, you probably wouldn’t start with a create-project though, but instead just get your composer.json (or composer.lock) from somewhere and then do composer install.

Thanks for reply,


Would you please provide the sample composer.json file or any reference where provide minimum dependency required for production server

Please find our below composer.json.

That is basically the neos base distribution one, and that is the correct place to start your own production deployment composer.json. You maybe should give it an own name instead of “neos/neos-base-distribution” though.

Now what you need to do is, remove the neos/demo site package, the site-kickstarter, the ui-compiler and what is “neos/test”? You don’t need those in production. Also remove the require-dev section.

Then you add your own site package as a dependency, e.g “acme/cool-site”. You can then either provide that yourself via a git repository that you map in composer like here (https://getcomposer.org/doc/05-repositories.md#using-private-repositories)

OR

you use the “DistributionPackages” folder inside the distribution directly. You just need to place your own site package inside (e.g. ./DistributionPackages/Acme.CoolSite with it’s own composer giving it the name “acme/cool-site” or whatever you call your package) and then commit and deploy it together with the composer.json. Composer will then find the dependency to your site package from that source folder and it will work out of the box, even with multiple packages side by side.
For more information on that aproach, take a look at https://github.com/kitsunet/composer-mono-project which is basically the same setup and explains the reasons for doing it that way.

Best regards,
Alexander

I disagree here… You will need to adjust the composer manifest, but that create-project gives you some more things, one of the more helpful ones is the .gitignore.

Also, any useful changes we do to the composer manifest (like the path repository for DistributionPackages end up at with the developer automatically through this.

And there’s also the Neos-Skeleton which probably provides a better setup for people starting out with a new project.

The packages neos/demo and neos/nodetype should not be part of any new projects.

You will need to adjust the composer manifest, but that create-project gives you some more things, one of the more helpful ones is the .gitignore .

I was assuming that create-project was run on the developer machine initially, the composer.json updated and then committed to a repository for the project. Then on the “production setup” you would just git checkout and composer install (ofc wrapped in some more sophisticated deploy script logic as necessary). At least that’s my way of doing things.

Of course create-project is a one-off command to start a project. But I use that “in production”, i.e. for starting “real projects”. That’s what I implied was the question here… to deploy to a production server, you will never use it, right.