Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Adding links to net-containers using alias
Browse files Browse the repository at this point in the history
  • Loading branch information
johanpiet committed Jul 24, 2017
1 parent db054d6 commit 3cdde0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/coffee/compose.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = (config) ->
for l in links
deps[l] = condition: 'service_started' unless deps[l]
service.depends_on = deps
# delete service.links

_resolvePath: resolvePath = (root, path) ->
path = path[1...] if path[0] is '/'
Expand Down Expand Up @@ -69,6 +68,7 @@ module.exports = (config) ->
if service.labels['bigboat.service.type'] in ['service', 'oneoff']
labels = _.extend {}, service.labels,
'bigboat.service.type': 'net'
links = service.links?.map (l) -> "bb-net-#{l.split(':')[0]}:#{l.split(':')[0]}"
subDomain = "#{instance}.#{config.domain}.#{config.tld}"
netcontainer =
image: config.net_container.image
Expand All @@ -81,6 +81,7 @@ module.exports = (config) ->
stop_signal: 'SIGKILL'
volumes: ['/var/run/dnsreg:/var/run/dnsreg']
restart: 'unless-stopped'
netcontainer.links = links if links
if config.net_container?.healthcheck
netcontainer.healthcheck = config.net_container.healthcheck

Expand All @@ -92,6 +93,7 @@ module.exports = (config) ->
# the network container
delete service.hostname
delete service.net
delete service.links
service.network_mode = "service:bb-net-#{serviceName}"

depends_on = composeLib.transformDependsOnToObject(service.depends_on) or {}
Expand Down

0 comments on commit 3cdde0b

Please sign in to comment.