An fpm wrapper for node projects
I got sick of manually building .deb files at work for node projects, so I wrote this little collection of scripts/spec for my sanity.
Debbie will grab your project's name and version from your package.json
when building the deb file. This is awesome because you only have to make a change in one place and then run sh make-deb.sh
and you'll have a brand new deb with all the correct stuff configured!
- Clone this repository
- Copy paste
make-deb.sh
anddeb_files/
to your project's root directory - Edit deb_files/files.whitelist with the names of all the files and folders in your root directory that you want to include.
- Add whatever you want to go in
/bin
with your project's name todeb_files/
(e.g.node opt/<projectname>/myproject.js
) - Add a
<projectname>.conf
todeb_files
that specifies your configuration
- Some of the commands
make-deb.sh
relies on (notably, thegrep
commands used to scrape out the name and version frompackage.json
) will currently only work reliably on linux. make-deb.sh
makes use of fpm for the actual packaging, which it will install for you if it is not installed. This does require rubygems.
The script is not complicated, edit it as you see fit!
- Lock down node_modules with shrinkwrap, so node_module binaries can be installed after .deb is deployed
- Support building debs on OS X
- Make script less brittle and output more pretty