Skip to content

Commit

Permalink
Fix git ssh proxying
Browse files Browse the repository at this point in the history
  • Loading branch information
j3k0 committed Dec 15, 2015
1 parent e892d0c commit 2eee115
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
22 changes: 20 additions & 2 deletions compose/proxy.yml
Expand Up @@ -14,7 +14,25 @@ proxy:
- gitlab
- redmine
- vault
expose:
- 80
- 443
environment:
- DEFAULT_SSL_CERT=<%=sslcert%>
- TCP_PORTS=80,443,22/ssl
- EXCLUDE_PORTS=1936
- FORCE_SSL=YES
- TCP_PORTS=80,443
- EXCLUDE_PORTS=22,1936

proxyssh:
image: tutum/haproxy:0.2.1
hostname: proxyssh.<%=domain%>
restart: always
links:
- gitlab
expose:
- 22
environment:
- TCP_PORTS=22
- MODE=tcp
- TIMEOUT=connect 30s, client 24h, server 24h
- EXCLUDE_PORTS=80,443,1936
1 change: 1 addition & 0 deletions lib/command/inspect.js
Expand Up @@ -38,6 +38,7 @@ cmd.action = function(options, cb) {
'gitSshPort',
'sslcertselfsigned',
'version',
'rootpassword',
'adminpassword',
'status',
'vaultpath'
Expand Down
2 changes: 1 addition & 1 deletion lib/command/prepare.js
Expand Up @@ -16,7 +16,7 @@ cmd.register = function(program) {

cmd.registerFull = function(program) {
return program.arguments('<deploy-id>')
.option('--no-pull', 'Do not pull images');
.option('--pull', 'Also pull docker images');
};

cmd.action = function(options, cb) {
Expand Down
8 changes: 6 additions & 2 deletions lib/metaproxy.js
Expand Up @@ -35,9 +35,13 @@ metaproxy.deactivate = function(domain, cb) {

metaproxy.containerConfig = function(conf) {
var cname = mods.deploys.composeName(conf.id) + "_proxy_" + 1;
var cnamessh = mods.deploys.composeName(conf.id) + "_proxyssh_" + 1;
return {
Image: metaproxy.image,
Links: [ cname + ":" + cname ],
Links: [
cname + ":" + cname,
cnamessh + ":" + cnamessh
],
PortBindings: {
"80/tcp": [{ HostPort: conf.httpPort + "/tcp" }],
"443/tcp": [{ HostPort: conf.httpsPort + "/tcp" }],
Expand All @@ -50,7 +54,7 @@ metaproxy.containerConfig = function(conf) {
},
Env: [
"MODE=tcp",
"TIMEOUT=connect 10s, client 1h, server 1h"
"TIMEOUT=connect 10s, client 24h, server 24h"
],
name: metaproxy.name(conf.domain)
};
Expand Down
2 changes: 1 addition & 1 deletion lib/service/proxy.js
Expand Up @@ -2,5 +2,5 @@ var service = module.exports = {};

service.name = "proxy";
service.composeFile = "proxy.yml";
service.computes = [ "proxy" ];
service.computes = [ "proxy", "proxyssh" ];
service.volumes = [];

0 comments on commit 2eee115

Please sign in to comment.