Skip to content

Commit ab53fda

Browse files
committed
Merge remote-tracking branch 'origin/main' into mcp-with-on-demand-tokens
2 parents 56c1933 + d1c2938 commit ab53fda

4 files changed

Lines changed: 24 additions & 4 deletions

File tree

src/cli/cli_main.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def create(name: str, config_files: list, config_dir: str, env_file: str, servic
6666
if len(config_files) != 1:
6767
raise click.ClickException("Exactly one config file is supported; please provide a single -c file.")
6868

69-
print("Starting ARCHI deployment process...")
69+
click.echo("Starting ARCHI deployment process...")
7070
setup_cli_logging(verbosity=verbosity)
7171
logger = get_logger(__name__)
7272

@@ -284,6 +284,7 @@ def restart(
284284
):
285285
"""Restart a specific service in an existing deployment while reusing its configured ports."""
286286
setup_cli_logging(verbosity=verbosity)
287+
logger = get_logger(__name__)
287288

288289
if not podman and not check_docker_available():
289290
raise click.ClickException(
@@ -389,6 +390,13 @@ def restart(
389390
allow_port_reuse=True,
390391
)
391392

393+
if not no_build and not (config_files or config_dir):
394+
template_manager = TemplateManager(env, verbosity)
395+
try:
396+
template_manager.copy_source_code(deployment_dir)
397+
except Exception as e:
398+
logger.warning(f"Warning: could not update source code before rebuild: {e}", err=True)
399+
392400
deployment_manager = DeploymentManager(use_podman=podman)
393401
deployment_manager.restart_service(
394402
deployment_dir=deployment_dir,
@@ -482,7 +490,7 @@ def evaluate(name: str, config_file: str, config_dir: str, env_file: str, force:
482490
else:
483491
config_files = [item for item in config_file.split(",")]
484492

485-
print("Starting ARCHI benchmarking process...")
493+
click.echo("Starting ARCHI benchmarking process...")
486494
setup_cli_logging(verbosity=verbosity)
487495
logger = get_logger(__name__)
488496

src/cli/managers/templates_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def _stage_web_lists(self, context: TemplateContext) -> None:
265265
self._copy_web_input_lists(context)
266266

267267
def _stage_source_copy(self, context: TemplateContext) -> None:
268-
self._copy_source_code(context.base_dir)
268+
self.copy_source_code(context.base_dir)
269269

270270
def _stage_benchmarking(self, context: TemplateContext) -> None:
271271
query_file = context.pop_option("query_file")
@@ -665,7 +665,7 @@ def _copy_web_input_lists(self, context: TemplateContext) -> None:
665665
else:
666666
logger.warning(f"Configured input list {input_list} not found; skipping")
667667

668-
def _copy_source_code(self, base_dir: Path) -> None:
668+
def copy_source_code(self, base_dir: Path) -> None:
669669
# Try to locate the repository root in a robust way. Prefer CWD when
670670
# it contains expected marker files (pyproject.toml, LICENSE, .git)
671671
# — this is what the template/preview code typically uses. If CWD

src/cli/templates/base-compose.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@ services:
337337
condition: service_completed_successfully
338338
{% endif -%}
339339
environment:
340+
PGHOST: {{ 'localhost' if host_mode else 'postgres' }}
341+
PGPORT: {{ postgres_port }}
342+
PGDATABASE: archi-db
343+
PGUSER: archi
340344
{% for secret in required_secrets | default([]) -%}
341345
{{ secret.upper() }}_FILE: /run/secrets/{{ secret.lower() }}
342346
{% endfor %}
@@ -468,6 +472,10 @@ services:
468472
condition: service_completed_successfully
469473
{% endif -%}
470474
environment:
475+
PGHOST: {{ 'localhost' if host_mode else 'postgres' }}
476+
PGPORT: {{ postgres_port }}
477+
PGDATABASE: archi-db
478+
PGUSER: archi
471479
{% for secret in required_secrets | default([]) -%}
472480
{{ secret.upper() }}_FILE: /run/secrets/{{ secret.lower() }}
473481
{% endfor %}
@@ -528,6 +536,10 @@ services:
528536
condition: service_completed_successfully
529537
{% endif -%}
530538
environment:
539+
PGHOST: {{ 'localhost' if host_mode else 'postgres' }}
540+
PGPORT: {{ postgres_port }}
541+
PGDATABASE: archi-db
542+
PGUSER: archi
531543
{% for secret in required_secrets | default([]) -%}
532544
{{ secret.upper() }}_FILE: /run/secrets/{{ secret.lower() }}
533545
{% endfor %}

src/cli/templates/grafana/a2rchi-default-dashboard.json renamed to src/cli/templates/grafana/archi-default-dashboard.json

File renamed without changes.

0 commit comments

Comments
 (0)