https://github.com/robin-rpr/nginx-nodejs
NGINX & Node.js ⚡️
https://github.com/robin-rpr/nginx-nodejs
docker dockerimage nginx nodejs supervisord
Last synced: 10 months ago
JSON representation
NGINX & Node.js ⚡️
- Host: GitHub
- URL: https://github.com/robin-rpr/nginx-nodejs
- Owner: robin-rpr
- License: mit
- Created: 2020-09-04T08:01:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T14:17:04.000Z (almost 5 years ago)
- Last Synced: 2025-01-08T01:46:54.662Z (about 1 year ago)
- Topics: docker, dockerimage, nginx, nodejs, supervisord
- Language: Dockerfile
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nginx-nodejs
## Example
Example is located in [`examples/hello-world`](examples/hello-world)
```
package.json
main.js
default.conf # NGINX Config
Dockerfile # See below
```
Dockerfile:
```
FROM robinrpr/nginx-nodejs:latest
# Create your Working directory
RUN mkdir -p /home/app
WORKDIR /home/app
# Copy all
COPY --chown=root:root . .
# Npm Install
RUN npm i
# Update NGINX Config
RUN mv default.conf /etc/nginx/conf.d/default.conf
# Append to Supervisord Config
RUN echo '[program:nodejs]\n\
directory=/home/app\n\
command=node main.js\n'\
>> /etc/supervisor/conf.d/nginx-nodejs.conf
# (optional)
EXPOSE 4000
# Start all
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
```
> **Note:** For all other files please see [`examples/hello-world`](examples/hello-world) as mentioned above.
## Credits
Thanks to the maintainer of
- [klokantech/supervisord](https://hub.docker.com/r/klokantech/supervisord)
Cheers!