Comment by bradly
15 years ago
"If the app needs to shell out to a system tool, that tool should be vendored into the app"
I have never seen this done before. Is this really a best practice? I mean at some point your app has to depend on certain tools in place by the OS, right?
I was a little skeptical about this piece of advice too. How would one go about doing this? Let's say the binary in question is curl. Do you vendor binaries for each operating system that you might deploy to? Or do you vendor the source code and compile it for your target system in the build step? Does that mean GCC is a dependency? I feel like it's turtles all the way down. What about things like Ruby gems that require native compilation? Do you vendor the libraries that you need in order to compile the gems? For example, the pg gem requires PostgreSQL development files installed in order to compile.
I think it depends on the tool in question. If your application uses the tool heavily, in customized or unusual ways, it might be worth packaging it with your application.
Examples could be varnish and nginx and postgresql.
You probably don't need to package postfix.