Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

DangX

This is a simple configuration of running a Node.JS API behind Nginx.

             Docker Container
+---------------------------------------------------+
|                                                   |
|        ^     +                                    |
|        |     |  :8080                             |
|        +     v                                    |
|                                                   |
|  +-------------------+        +----------------+  |
|  |                   | :8081  |                |  |
|  |                   |  +---> |                |  |
|  |    Nginx          |        |   Node.JS      |  |
|  |                   |        |                |  |
|  |                   |  <---+ |                |  |
|  +-------------------+        +----------------+  |
|                                                   |
|                                                   |
+---------------------------------------------------+

Technologies

  • Docker
  • Alpine Linux
  • Node.JS
  • Nginx
  • pm2

The Setup

  • Alpine Linux as the main OS
  • Node.JS is listening from port 8081
  • Nginx is configured as a Web Server and Reverse Proxy Server
  • Mounted Folder
    • routes, models, *.js are mounted onto the container except for some other files/folders, see .dockerignore
  • pm2 manages Node.JS server in watch mode. Changes to *.js files triggers a server restart

Commands

  • $ docker-compose up # starts the container
  • $ docker-compose up --build # rebuild the image

References

License

MIT

About

DangX: Docker + Alpine Linux + NodeJS API + Nginx Reverse Proxy Server

Topics

Resources

License

Releases

No releases published

Packages

No packages published