diff --git a/src/backends/compose/compose_backend.py b/src/backends/compose/compose_backend.py index 8c22ee412..1099fd443 100644 --- a/src/backends/compose/compose_backend.py +++ b/src/backends/compose/compose_backend.py @@ -19,7 +19,6 @@ default_bitcoin_conf_args, get_architecture, parse_raw_messages, - set_execute_permission, ) from .services import SERVICES @@ -359,14 +358,6 @@ def default_config_args(self, tank): defaults += f" -addnode={self.get_container_name(dst_index, ServiceType.BITCOIN)}" return defaults - def copy_configs(self, tank): - warnet_tor_dir = tank.config_dir / "tor" - warnet_tor_dir.mkdir() - shutil.copyfile(TEMPLATES / DOCKERFILE_NAME, tank.config_dir / DOCKERFILE_NAME) - shutil.copyfile(TEMPLATES / "tor" / TORRC_NAME, warnet_tor_dir / TORRC_NAME) - shutil.copyfile(TEMPLATES / ENTRYPOINT_NAME, tank.config_dir / ENTRYPOINT_NAME) - set_execute_permission(tank.config_dir / ENTRYPOINT_NAME) - def add_services(self, tank: Tank, compose): services = compose["services"] assert tank.index is not None @@ -386,7 +377,6 @@ def add_services(self, tank: Tank, compose): tank.DEFAULT_BUILD_ARGS + tank.build_args, arches=get_architecture(), ) - self.copy_configs(tank) elif tank.image: # Pre-built custom image image = tank.image diff --git a/src/warnet/tank.py b/src/warnet/tank.py index 06ba0828f..a4794b6c1 100644 --- a/src/warnet/tank.py +++ b/src/warnet/tank.py @@ -3,7 +3,6 @@ """ import logging -from pathlib import Path from backends import ServiceType from warnet.lnnode import LNNode @@ -24,9 +23,8 @@ class Tank: DEFAULT_BUILD_ARGS = "--disable-tests --with-incompatible-bdb --without-gui --disable-bench --disable-fuzz-binary --enable-suppress-external-warnings --enable-debug " - def __init__(self, index: int, config_dir: Path, warnet): + def __init__(self, index: int, warnet): self.index = index - self.config_dir = config_dir self.warnet = warnet self.network_name = warnet.network_name self.bitcoin_network = warnet.bitcoin_network @@ -84,9 +82,6 @@ def parse_graph_node(self, node): self.warnet, self, impl, image, self.warnet.container_interface, cb_image ) - self.config_dir = self.warnet.config_dir / str(self.suffix) - self.config_dir.mkdir(parents=True, exist_ok=True) - logger.debug( f"Parsed graph node: {self.index} with attributes: {[f'{key}={value}' for key, value in graph_properties.items()]}" ) @@ -95,11 +90,9 @@ def parse_graph_node(self, node): def from_graph_node(cls, index, warnet, tank=None): assert index is not None index = int(index) - config_dir = warnet.config_dir / str(f"{index:06}") - config_dir.mkdir(parents=True, exist_ok=True) self = tank if self is None: - self = cls(index, config_dir, warnet) + self = cls(index, warnet) node = warnet.graph.nodes[index] self.parse_graph_node(node) return self