2525from dataclasses import dataclass
2626from importlib import resources
2727from pathlib import Path
28- from stack import constants
28+ from stack . constants import compose_file_prefix , cluster_name_prefix
2929from stack .opts import opts
3030from stack .util import (
3131 include_exclude_check ,
@@ -220,7 +220,7 @@ def _make_default_cluster_name(deployment, compose_dir, stack, include, exclude)
220220 if opts .o .debug :
221221 print (f"pre-hash descriptor: { unique_cluster_descriptor } " )
222222 hash = hashlib .md5 (unique_cluster_descriptor .encode ()).hexdigest ()[:16 ]
223- cluster = f"{ constants . cluster_name_prefix } { hash } "
223+ cluster = f"{ cluster_name_prefix } { hash } "
224224 if opts .o .debug :
225225 print (f"Using cluster name: { cluster } " )
226226 return cluster
@@ -276,12 +276,12 @@ def _make_cluster_context(ctx, stack, include, exclude, cluster, env_file):
276276 if include_exclude_check (pod_name , include , exclude ):
277277 if pod_repository is None or pod_repository == "internal" :
278278 if deployment :
279- compose_file_name = os .path .join (compose_dir , f"docker-compose -{ pod_path } .yml" )
279+ compose_file_name = os .path .join (compose_dir , f"{ compose_file_prefix } -{ pod_path } .yml" )
280280 else :
281281 compose_file_name = resolve_compose_file (stack , pod_name )
282282 else :
283283 if deployment :
284- compose_file_name = os .path .join (compose_dir , f"docker-compose -{ pod_name } .yml" )
284+ compose_file_name = os .path .join (compose_dir , f"{ compose_file_prefix } -{ pod_name } .yml" )
285285 pod_pre_start_command = pod .get ("pre_start_command" )
286286 pod_post_start_command = pod .get ("post_start_command" )
287287 script_dir = compose_dir .parent .joinpath ("pods" , pod_name , "scripts" )
@@ -292,7 +292,7 @@ def _make_cluster_context(ctx, stack, include, exclude, cluster, env_file):
292292 else :
293293 # TODO: fix this code for external stack with scripts
294294 pod_root_dir = os .path .join (dev_root_path , pod_repository .split ("/" )[- 1 ], pod ["path" ])
295- compose_file_name = os .path .join (pod_root_dir , f"docker-compose -{ pod_name } .yml" )
295+ compose_file_name = os .path .join (pod_root_dir , f"{ compose_file_prefix } -{ pod_name } .yml" )
296296 pod_pre_start_command = pod .get ("pre_start_command" )
297297 pod_post_start_command = pod .get ("post_start_command" )
298298 if pod_pre_start_command is not None :
0 commit comments