thanks. this looks like what i’m going to want.
The main thing I’m going for here is to have the production server contain only the necessary files for the production environment. I don’t want it to include anything it doesn’t need to. Ideally, I’d rather it didn’t include composer.json in the site root (I’m using bedrock), though I suppose at least this isn’t in the web root.
When I read your comment last night (on my phone, sorry for the late reply), it got me thinking about what would be the ideal way to deploy.
I feel like I should have a “build” command on my development server that will compile everything, optimize it and remove the unnecessary “scaffolding” files like composer.json, package.json etc, and will zip everything up and upload that to github/bitbucket as a “release” archive. The server would then pull that and unpack it on the server, so I would end up with the server containing only the necessary files to run.
For example, looking at just the Sage theme, you’d rather not publish all of the .scss/.less files to your production server, and would rather include only the compiled/concatenated/minified css/js files.
However, as it stands with a Bedrock and Capistrano deploy, it appears as though it pulls the code from the repo itself on bitbucket (I’m using bitbucket, not github), and then actually runs composer update on the server.
Is there a better way? I feel like there must be. Do I want to look into CI servers or something? Sorry if this is all a bit off topic and/or rambling.
edit
Something like this: http://stackoverflow.com/a/21722205/3972095
The guy basically says, you don’t want to install dependencies on the server, only production files and stuff. How can I do this?