Merge branch 'master' into forwarding
This commit is contained in:
commit
78e8266ce3
|
@ -71,15 +71,16 @@ function readConfigAndRun(args) {
|
||||||
config = recase.camelCopy(config);
|
config = recase.camelCopy(config);
|
||||||
|
|
||||||
if (!config.dns) {
|
if (!config.dns) {
|
||||||
config.dns = { proxy: { port: 3053 } };
|
config.dns = { modules: { name: 'proxy', port: 3053 } };
|
||||||
}
|
}
|
||||||
if (!config.tcp) {
|
if (!config.tcp) {
|
||||||
config.tcp = {};
|
config.tcp = {};
|
||||||
}
|
}
|
||||||
if (!config.http) {
|
if (!config.http) {
|
||||||
config.http = { proxy: { port: 3000 } };
|
config.http = { modules: { name: 'proxy', port: 3000 } };
|
||||||
}
|
}
|
||||||
if (!config.tls) {
|
if (!config.tls) {
|
||||||
|
console.log("TODO: tls: { modules: { name: 'acme', email: 'foo@bar.com', domains: [ '*' ] } }");
|
||||||
config.tls = {
|
config.tls = {
|
||||||
agreeTos: args.agreeTos || args.agree || args['agree-tos']
|
agreeTos: args.agreeTos || args.agree || args['agree-tos']
|
||||||
, servernames: (args.servernames||'').split(',').filter(Boolean).map(function (str) { return str.toLowerCase(); })
|
, servernames: (args.servernames||'').split(',').filter(Boolean).map(function (str) { return str.toLowerCase(); })
|
||||||
|
|
16
install.sh
16
install.sh
|
@ -169,6 +169,7 @@ set -u
|
||||||
dap_dl_bash "https://git.daplie.com/coolaj86/node-install-script/raw/master/setup-min.sh"
|
dap_dl_bash "https://git.daplie.com/coolaj86/node-install-script/raw/master/setup-min.sh"
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
|
# TODO install to tmp location, then move to /opt
|
||||||
export NODE_PATH=/opt/goldilocks/lib/node_modules
|
export NODE_PATH=/opt/goldilocks/lib/node_modules
|
||||||
export NPM_CONFIG_PREFIX=/opt/goldilocks
|
export NPM_CONFIG_PREFIX=/opt/goldilocks
|
||||||
$sudo_cmd mkdir -p /etc/goldilocks
|
$sudo_cmd mkdir -p /etc/goldilocks
|
||||||
|
@ -176,13 +177,26 @@ $sudo_cmd mkdir -p /var/log/goldilocks
|
||||||
$sudo_cmd mkdir -p /srv/www
|
$sudo_cmd mkdir -p /srv/www
|
||||||
$sudo_cmd mkdir -p /var/www
|
$sudo_cmd mkdir -p /var/www
|
||||||
$sudo_cmd mkdir -p /opt/goldilocks/{lib,bin,etc}
|
$sudo_cmd mkdir -p /opt/goldilocks/{lib,bin,etc}
|
||||||
|
|
||||||
|
# Change to user perms
|
||||||
|
|
||||||
|
# OS X or Linux
|
||||||
|
$sudo_cmd chown -R $(whoami) /opt/goldilocks/ || true
|
||||||
|
|
||||||
|
npm install -g 'git+https://git@git.daplie.com/Daplie/goldilocks.js.git#v1'
|
||||||
|
# Finish up with submodule
|
||||||
|
pushd /opt/goldilocks/lib/node_modules/goldilocks
|
||||||
|
bash ./update-packages.sh
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Change to admin perms
|
||||||
|
|
||||||
# OS X
|
# OS X
|
||||||
$sudo_cmd chown _www:_www /var/www /srv/www || true
|
$sudo_cmd chown _www:_www /var/www /srv/www || true
|
||||||
$sudo_cmd chown -R _www:_www /opt/goldilocks/{lib,bin,etc} || true
|
$sudo_cmd chown -R _www:_www /opt/goldilocks/{lib,bin,etc} || true
|
||||||
# Linux
|
# Linux
|
||||||
$sudo_cmd chown www-data:www-data /var/www /srv/www || true
|
$sudo_cmd chown www-data:www-data /var/www /srv/www || true
|
||||||
$sudo_cmd chown -R www-data:www-data /opt/goldilocks/{lib,bin,etc} || true
|
$sudo_cmd chown -R www-data:www-data /opt/goldilocks/{lib,bin,etc} || true
|
||||||
npm install -g 'git+https://git@git.daplie.com/Daplie/goldilocks.js.git#v1'
|
|
||||||
|
|
||||||
# Unistall
|
# Unistall
|
||||||
dap_dl "https://git.daplie.com/Daplie/goldilocks.js/raw/master/uninstall.sh" "./goldilocks-uninstall"
|
dap_dl "https://git.daplie.com/Daplie/goldilocks.js/raw/master/uninstall.sh" "./goldilocks-uninstall"
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
"serve-index": "^1.7.0",
|
"serve-index": "^1.7.0",
|
||||||
"serve-static": "^1.10.0",
|
"serve-static": "^1.10.0",
|
||||||
"server-destroy": "^1.0.1",
|
"server-destroy": "^1.0.1",
|
||||||
|
"socket-pair": "^1.0.0",
|
||||||
"stream-pair": "^1.0.3",
|
"stream-pair": "^1.0.3",
|
||||||
"stunnel": "git+https://git.daplie.com/Daplie/node-tunnel-client.git#v1"
|
"stunnel": "git+https://git.daplie.com/Daplie/node-tunnel-client.git#v1"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue