Skip to content

Instantly share code, notes, and snippets.

@devops-1
devops-1 / 00_nginx.config
Created May 31, 2017 23:00
00_nginx.config
container_commands:
01-nginx:
command: /opt/elasticbeanstalk/hooks/configdeploy/enact/35_nginx.sh
files:
"/home/ec2-user/nginx.conf":
mode: "000644"
owner: root
group: root
content : |
@devops-1
devops-1 / cluster.js
Created May 31, 2017 23:00
cluster.js
var cluster = require('cluster');
var numCPUs = require('os').cpus().length;
var _ = require('underscore');
if (!process.env.PORT) {
throw new Error('process.env.PORT not set');
}
var CLUSTER_ENV_VARS = {};