{"id":14069666,"url":"https://github.com/deployable/node-docker-demo-app","last_synced_at":"2026-05-10T19:04:00.245Z","repository":{"id":149113443,"uuid":"77716643","full_name":"deployable/node-docker-demo-app","owner":"deployable","description":"An Node.js app running in Docker with various process supervisors (s6, docker, nodemon, forever, supervisor)","archived":false,"fork":false,"pushed_at":"2018-03-12T04:07:18.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T20:27:26.660Z","etag":null,"topics":["docker","forever","nodejs","nodemon","s6","supervisor"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deployable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-12-30T23:59:13.000Z","updated_at":"2023-06-10T08:49:09.000Z","dependencies_parsed_at":"2023-04-26T01:01:49.758Z","dependency_job_id":null,"html_url":"https://github.com/deployable/node-docker-demo-app","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-docker-demo-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-docker-demo-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-docker-demo-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-docker-demo-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deployable","download_url":"https://codeload.github.com/deployable/node-docker-demo-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157133,"owners_count":20893210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","forever","nodejs","nodemon","s6","supervisor"],"created_at":"2024-08-13T07:07:07.532Z","updated_at":"2026-05-10T19:04:00.170Z","avatar_url":"https://github.com/deployable.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Docker Node.js Application Supervision\n\nExamples of running a nodejs app under Docker with various process managers. \n\n- Plain Docker\n- [supervisor](http://supervisord.org/)\n- [s6](http://skarnet.org/software/s6/overview.html)\n- [nodemon](https://nodemon.io/)\n- [forever](https://github.com/foreverjs/forever)\n\nExamples have both the Debian based [`node`](https://hub.docker.com/_/node) image and\n the Alpine [`mhart/alpine-node`](https://hub.docker.com/r/mhart/alpine-node) image using Node v8.9.3\n\nThe node app will run as `nobody` in each setup. \n\n\n## Plain Node + Docker\n\nThe app must handle the sigint (ctrl-c) and sigterm (`docker stop`) signals when running as PID 1 in Docker\n\n    docker build -f Dockerfile.plain -t dply/node-docker-demo-app:plain .\n    docker run -dp 8080:8080 --restart always dply/node-docker-demo-app:plain\n    curl http://localhost:8080\n\n## s6\n\nUses the [s6-overlay](https://github.com/just-containers/s6-overlay) project.\n\n    docker build -f Dockerfile.s6 -t dply/node-docker-demo-app:s6 .\n    docker run -dp 8080:8080 dply/node-docker-demo-app:s6\n    curl http://localhost:8080\n\n## forever\n\nForever doesn't handle sigint and sigterm when running a script in the foreground.\n\n    docker build -f Dockerfile.plain -t dply/node-docker-demo-app:forever .\n    docker run -dp 8080:8080 dply/node-docker-demo-app:forever\n    curl http://localhost:8080\n\n## nodemon\n\n`-ti` is required to attach and control nodemon\n\n    docker build -f Dockerfile.nodemon -t dply/node-docker-demo-app:nodemon .\n    docker run -dtip 8080:8080 dply/node-docker-demo-app:nodemon\n    curl http://localhost:8080\n\n## supervisor\n\nSupervisor is easy to configure and provides an XMLRPC API to programatically\nmanage your services running in Docker\n\n    docker build -f Dockerfile.plain -t dply/node-docker-demo-app:supervisor .\n    docker run -dp 8080:8080 dply/node-docker-demo-app:supervisor\n    curl http://localhost:8080\n\n## make.sh\n\nThe `./make.sh` script can build and run everything\n\nThe default is `./make.sh build`\n\n`./make.sh build_s6`\n\n`./make.sh run s6`\n\n`./make.sh run s6-alpine`\n\n`./make.sh test`\n\n`./make.sh build plain`\n\n`./make.sh run plain`\n\netc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeployable%2Fnode-docker-demo-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeployable%2Fnode-docker-demo-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeployable%2Fnode-docker-demo-app/lists"}