Skip to content

schempy/docker-nginx-node-part1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Nginx and Node.js with Docker

This example wil be using Docker to create a Nginx web server and a Nodejs server. Nginx will be configured to use the Nodejs server as a proxy to a specfic url.

Directory Structure

nodejs/
	Dockerfile
	src/
		package.json
		server.js
web/
	src/
		public/
			index.html
config/
	nginx.conf

scripts/
	ngnix.sh
	node.sh

The nodejs directory contains a Dockerfile to create a Docker image and a src directory that stores the nodejs server javascript file and package.json file.

The web directory contains the static web files used by the Nginx web server.

The config directory contains the custom Nginx configuration file I’ll be using for creating the Nginx Docker container.

The scripts directory contains bash shell scripts to start the nginx and nodejs containers.

For more details about this example, checkout this article I wrote.

About

Dockering a Nginx server with a proxy to Nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published