Sign inSign up

stevepacker/nodejs-supervisor

By stevepacker

Updated about 10 years ago

NodeJS with Node_Supervisor on Alpine Linux

Image
0

869

stevepacker/nodejs-supervisor repository overview

NodeJS

This container runs NodeJS on Alpine Linux.

It is also bundled with Node_Supervisor and Nodemon.
Both are installed globally if you'd like to use them.

A user node is created with UID=1000 to run as an unprivileged user.

NPM Install

During initialization, if file /app/package.json exists, and if /app/node_modules is either empty or not there, this container will automatically run npm install within /app to install all dependencies.

Additionally, if /app/package.json exists, the "start" script will be ran (which defaults to running "node server.js").

You can also override the CMD or provide a different command via CLI.

Volumes

  • /app is where your application code should reside.

Environment Variables

SUPERVISOR= SUPERVISORFLAGS=

Provides a means to wrap your application in a supervisor. Example:

  • SUPERVISOR=nodemon
  • SUPERVISOR=nodemon SUPERVISORFLAGS="--watch /app/lib --delay 5"
  • SUPERVISOR=supervisor SUPERVISORFLAGS="--non-interactive --timestamp --no-restart-on success --exec"

Tag summary

Content type

Image

Digest

Size

12.7 MB

Last updated

about 10 years ago

docker pull stevepacker/nodejs-supervisor