mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-05-21 16:16:49 +02:00
Fix parameters bug + installation issues
This commit is contained in:
@@ -65,12 +65,12 @@ def get_registry_url(context: str = "default") -> str:
|
||||
return os.getenv("FUZZFORGE_REGISTRY_PULL_URL", os.getenv("FUZZFORGE_REGISTRY_PUSH_URL", "localhost:5001"))
|
||||
|
||||
|
||||
def _compose_project_name(default: str = "fuzzforge_alpha") -> str:
|
||||
def _compose_project_name(default: str = "fuzzforge") -> str:
|
||||
"""Return the docker-compose project name used for network/volume naming.
|
||||
|
||||
Honors COMPOSE_PROJECT_NAME if present; falls back to a sensible default.
|
||||
Always returns 'fuzzforge' regardless of environment variables.
|
||||
"""
|
||||
return os.getenv("COMPOSE_PROJECT_NAME", default)
|
||||
return "fuzzforge"
|
||||
|
||||
|
||||
class PrefectManager:
|
||||
@@ -539,18 +539,18 @@ class PrefectManager:
|
||||
raise enhanced_error
|
||||
|
||||
# Determine the Docker Compose network name and volume names
|
||||
# Docker Compose creates networks with pattern: {project_name}_default
|
||||
# Hardcoded to 'fuzzforge' to avoid directory name dependencies
|
||||
import os
|
||||
compose_project = _compose_project_name('fuzzforge_alpha')
|
||||
docker_network = f"{compose_project}_default"
|
||||
compose_project = "fuzzforge"
|
||||
docker_network = "fuzzforge_default"
|
||||
|
||||
# Build volume mounts
|
||||
# Add toolbox volume mount for workflow code access
|
||||
backend_toolbox_path = "/app/toolbox" # Path in backend container
|
||||
|
||||
# Use dynamic volume names based on Docker Compose project name
|
||||
prefect_storage_volume = f"{compose_project}_prefect_storage"
|
||||
toolbox_code_volume = f"{compose_project}_toolbox_code"
|
||||
# Hardcoded volume names
|
||||
prefect_storage_volume = "fuzzforge_prefect_storage"
|
||||
toolbox_code_volume = "fuzzforge_toolbox_code"
|
||||
|
||||
volumes = [
|
||||
f"{target_path}:/workspace:{volume_mode}",
|
||||
|
||||
@@ -160,8 +160,8 @@ async def setup_docker_pool():
|
||||
"type": "array",
|
||||
"title": "Volume Mounts",
|
||||
"default": [
|
||||
f"{get_actual_compose_project_name()}_prefect_storage:/prefect-storage",
|
||||
f"{get_actual_compose_project_name()}_toolbox_code:/opt/prefect/toolbox:ro"
|
||||
"fuzzforge_prefect_storage:/prefect-storage",
|
||||
"fuzzforge_toolbox_code:/opt/prefect/toolbox:ro"
|
||||
],
|
||||
"description": "Volume mounts in format 'host:container:mode'",
|
||||
"items": {
|
||||
@@ -171,7 +171,7 @@ async def setup_docker_pool():
|
||||
"networks": {
|
||||
"type": "array",
|
||||
"title": "Docker Networks",
|
||||
"default": [f"{get_actual_compose_project_name()}_default"],
|
||||
"default": ["fuzzforge_default"],
|
||||
"description": "Docker networks to connect container to",
|
||||
"items": {
|
||||
"type": "string"
|
||||
@@ -211,10 +211,10 @@ def get_actual_compose_project_name():
|
||||
"""
|
||||
Return the hardcoded compose project name for FuzzForge.
|
||||
|
||||
Always returns 'fuzzforge_alpha' as per system requirements.
|
||||
Always returns 'fuzzforge' as per system requirements.
|
||||
"""
|
||||
logger.info("Using hardcoded compose project name: fuzzforge_alpha")
|
||||
return "fuzzforge_alpha"
|
||||
logger.info("Using hardcoded compose project name: fuzzforge")
|
||||
return "fuzzforge"
|
||||
|
||||
|
||||
async def setup_result_storage():
|
||||
@@ -388,10 +388,10 @@ async def validate_infrastructure():
|
||||
# Validate registry connectivity for custom image building
|
||||
await validate_registry_connectivity()
|
||||
|
||||
# Validate network (check for default network pattern)
|
||||
# Validate network (hardcoded to avoid directory name dependencies)
|
||||
import os
|
||||
compose_project = os.getenv('COMPOSE_PROJECT_NAME', 'fuzzforge_alpha')
|
||||
docker_network = f"{compose_project}_default"
|
||||
compose_project = "fuzzforge"
|
||||
docker_network = "fuzzforge_default"
|
||||
|
||||
try:
|
||||
await validate_docker_network(docker_network)
|
||||
|
||||
Reference in New Issue
Block a user