https://github.com/dashersw/docker-node-pm2
A pm2 application container for docker.
https://github.com/dashersw/docker-node-pm2
Last synced: about 1 year ago
JSON representation
A pm2 application container for docker.
- Host: GitHub
- URL: https://github.com/dashersw/docker-node-pm2
- Owner: dashersw
- Created: 2014-08-25T14:11:29.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-01-01T23:32:16.000Z (over 8 years ago)
- Last Synced: 2025-03-20T00:41:03.210Z (over 1 year ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 75
- Watchers: 6
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a very simple docker image with pm2, the process manager installed.
The image will use `/app` folder as the place for the source code and the working directory, so you should provide your app as a volume, i.e;
-v /path/to/app/source:/app
Also, the executable (app entry js file) should be noted as the environment variable APP. The default value for APP variable is `app.js`.
If you would like to enable files watching for any code changes, please set environment variable WATCH to `true`. The default value for WATCH variable is `false`.
The container exposes 80 and 443 ports so you can bind to them.
So a complete command for running a node.js application with pm2 could be;
docker run -d -e "APP=app.js" -e "WATCH=true" -p 3000:80 -v /path/to/app/source:/app dashersw/node-pm2