Skip to content

Commit

Permalink
Merge pull request #22 from marxlnfcs/main
Browse files Browse the repository at this point in the history
Added projectName, serviceName and opts to buildNetwork parameters,
  • Loading branch information
apocas authored Aug 18, 2022
2 parents 1bff33f + 5fdbc0c commit 037ac99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async function up(docker, projectName, recipe, output, options) {
};

if (service.networks !== undefined) {
servicesTools.buildNetworks(service.networks, networksToAttach);
servicesTools.buildNetworks(projectName, serviceName, service.networks, networksToAttach, opts);
} else {
opts.HostConfig.NetworkMode = projectName + '_default'
opts.NetworkingConfig.EndpointsConfig[projectName + '_default'] = {
Expand Down
2 changes: 1 addition & 1 deletion lib/servicesTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ module.exports = {
return output;
},

buildNetworks: function (serviceNetworks, networksToAttach) {
buildNetworks: function (projectName, serviceName, serviceNetworks, networksToAttach, opts) {
if (Array.isArray(serviceNetworks)) {
for (let index = 0; index < serviceNetworks.length; index++) {
let networkName = projectName + '_' + serviceNetworks[index];
Expand Down

0 comments on commit 037ac99

Please sign in to comment.