This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const http = require('http'); | |
console.log(`Server listening at port ${process.env.PORT || 8080}`); | |
http.createServer((request, response) => { | |
let headers = request.headers; | |
let method = request.method; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx | |
MAINTAINER Antonio Pintus | |
RUN mkdir /etc/nginx/logs/ | |
RUN touch /etc/nginx/logs/error.log | |
# copy and use the customized conf file | |
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 2; | |
events { | |
worker_connections 4096; | |
use epoll; | |
} | |
http { | |
upstream nodes { | |
least_conn; | |
server node1:3000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:4.1.2-onbuild | |
# docker mantainer | |
MAINTAINER pintux | |
# install all needed packages | |
RUN npm install | |
# expose port | |
EXPOSE 3000 |