Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Feb 4, 2025
1 parent a29350c commit edb137b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deployment-generator/src/gen_compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ function injectNetworkConfig(compose_object) {
let start_ip_service = 51;
Object.entries(compose_object["services"]).forEach((entry) => {
const [key, value] = entry;
let component_ip;
if (key.startsWith("subnet")){
const component_ip = ip_string_base + parseInt(start_ip_subnet);
component_ip = ip_string_base + parseInt(start_ip_subnet);
start_ip_subnet += 1;
} else {
const component_ip = ip_string_base + parseInt(start_ip_service);
component_ip = ip_string_base + parseInt(start_ip_service);
start_ip_service += 1;
}
if (!net.isIP(component_ip)) {
Expand Down

0 comments on commit edb137b

Please sign in to comment.