nodeJS image with supervisor
Based on node:latest
This image adds node-supervisor to the installation and runs the code with a restarting behavior. On startup, all of the watched folders are used for npm install, bower install and tsd install.
docker run -d -P -v $PWD/:/app smartive/dynamic-nginx
or with the port-definitions
docker run -d -p 9000:9000 -p 3001:3001 -v $PWD/:/app smartive/dynamic-nginx
with environment variables
docker run -d -P -e IGNORE_FILES=assets,public -e MAIN_FILE=server.js -e EXTENSIONS=js,json,coffee -v $PWD/:/app smartive/dynamic-nginx
if you want your node application not to restart on exit (e.g. for a one-time importer), you need to set NO_RESTART_ON. Possible values are explained below.
Folder that contains the whole application source code to run.
Base port for node application. Your application should listen for this port (e.g. expressJS)
Port for BrowserSync. (cool development plugin!)
Commaseparated list of pathes that should be ignored (from the root) [e.g. assets,public ]
Startup file for node
Commaseparated list of fileextensions that trigger a restart.
Commaseparated list of watched folders.
Tells supervisor not to restart on different conditions. If you don't set this variable, supervisor will restart your app no matter what (on code changes, normal exit or error exit). If you code somethink like a one-time-importer, you may not want to restart everytime. You can set the following variable values:
- error : error means, supervisor will not restart your application, if there was an error (i.e. exit code '0' will restart).
- exit : exit means, supervisor will not restart your application, if the application exited on normal conditions nor an error. The "only" trigger supervisor will use is a change of code.