# nginx-node-docker **Repository Path**: mirrors_cheton/nginx-node-docker ## Basic Information - **Project Name**: nginx-node-docker - **Description**: Nginx reversing proxy with Node v11.x (Yarn Support) - Docker - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-06-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Introduction This is an Alpine based container image running Nginx reversing proxy with Node v11.x (Yarn Support) ### Versioning | Docker Tag | GitHub Release | Nginx Version | Node Version | Alpine Version | |-----|-------|-----|--------|--------| | latest | master | 1.12.2 | 11.9.0 | 3.9 | | latest-lts | master-lts | 1.12.2 | 10.15.1 LTS | 3.9 | ## Building from source To build from source you need to clone the git repo and run docker build: ``` $ git clone https://github.com/MOXGA-OSS/nginx-node-docker.git ``` followed by ``` $ docker build -t nginx-node:latest . ``` ## Pulling from Docker Hub ``` $ docker pull finizco/nginx-node:latest ``` ## Running To run the container: ``` $ docker run -p 8080:8080 -e "NODE_PORT=3000" -d finizco/nginx-node:latest ``` Default Node root: ``` /app ``` ## Installing Node App To install a Node app in the root, simply map the app volumes to running nginx-node container: ``` $ docker run -p 8080:8080 -e "NODE_PORT=3000" -v /app:/app -d finizco/nginx-node:latest ``` The Node app should has a serve script in its package.json ``` "scripts": { ..., "serve": "node dist/index.js" } ``` ## Running Node App on Production (PM2 is recommended) To run the app on clustering mode with PM2 (Node.JS Process Manager) for production, add "--no-daemon" after the PM2 serve script For Example: ``` "scripts": { ..., "serve": "pm2 start dist/index.js -i max --name app --no-daemon" } ``` ## Environment Variables NODE_PORT - A port that the Node app is listening on (default is 3000). NODE_MODE - A mode of the running Node app (Specify prod for production, dev for development, default is prod). ## Docker-Compose Example ``` version: '3' services: nginx-node: restart: always image: finizco/nginx-node:latest ports: - "8080:8080" environment: - NODE_PORT=3000 - NODE_MODE=prod volumes: - /app:/app ``` ## License Nginx-Node-Docker is Apache Licensed.