Utility to aid in creating Debian (.deb) packages for NodeJS.
yarn add ndeb
dpkg
fakeroot
Just run this command with arguments:
ndeb --arg1 --arg2 -arg3
This command will add all of the above files and directories to a Debian package as well as generate the scripts
necessary to install, uninstall, start, and stop your application. On installation, via dpkg -i $your_package_name
,
dedicated Unix users and groups will be created and your distribution's default init system will start and monitor
the process.
Name | About | Type | Default |
---|---|---|---|
v |
Package version | required | - |
n pkg-name |
Package name for configurations and in the name of the app directory with source files. | required | - |
dir |
Folder with source files for packaging. | required | - |
a |
Architecture. For example, here are some any supported arch. | optional | all |
b |
Build number | optional | - |
verbose |
Debug mode | optional | - |
desc |
Comments for DEBIAN files. | optional | - |
deb-dir |
Directory for output deb files | optional | deb |
sd-doc |
Link to documentation | optional | - |
--sd-env |
Link to documentation | optional | - |
Folder with source files for packaging.
--desc #required
Comments for DEBIAN files.
--verbose #required
ndeb --b=123 --n=PackageName --user=UserName --group=GroupName --sources=SourceFolder --maintainer="John Doe" --desc="Any text" --depends=Dep1,Dep2 --sd-restart="on-failure" sd-execstart="/usr/bin/node /opt/packageName/app/build/server.js" --sd-doc=DocLink --sd-env="CONST_NAME=true,NODE_ENV=production"
These are all available through apt
and brew
.
ndeb
only officially supports the currently supported versions of Debian and Ubuntu (LTS). This includes both
for building packages and deploying packages. Care has been taken to ensure this packages correctly on macOS, and macOS
specific issues should still be reported.