catatnight/nginx-nodejs
docker image that runs Nginx with Node.js
500K+
A Dockerfile which produces a docker image that runs Nginx with Node.js.
save nodejs source code and nginx config file
nginx-nodejs/
|-Dockerfile <-- required: Dockerfile
|-src/ <-- required: nodejs source code
|-nginx/
|-sites-enabled/ <-- required: nginx config file
|-www/ <-- optional: static files
|-certs/ <-- optional: ssl certs
edit your own Dockerfile
From catatnight/nginx-nodejs
...
build image and run
docker build -t mysite .
docker run -p 80:80 --name mysite -d mysite
The image assumes that your application:
package.json
listing its dependencies.server.js
as the entrypoint script or define in package.json
the attribute: "scripts": {"start": "node <entrypoint_script_js>"}
(example)docker pull catatnight/nginx-nodejs