fix(proxy): use internal container port instead of host port
The proxy was using instance.port which is a dynamically allocated host port (e.g., 10001). But containers communicate on the Docker network using their internal ports (8443 for code-server, 8888 for jupyter). This caused connection failures when opening instances. - Add default_port field to ToolType model (null for terminal-only tools) - Create migration 0010 for default_port column - Update seed data: code-server=8443, jupyter=8888, opencode=null - Update proxy to use tool type's default_port instead of instance.port - Update frontend ToolType interface to include default_port Fixes: Opening instances now routes to correct internal container port
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""add default_port to tool_types
|
||||
|
||||
Revision ID: 0010_tool_type_default_port
|
||||
Revises: 0009_tool_configs
|
||||
Create Date: 2026-05-20 10:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "0010_tool_type_default_port"
|
||||
down_revision: Union[str, None] = "0009_tool_configs"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"tool_types",
|
||||
sa.Column("default_port", sa.Integer(), nullable=True)
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("tool_types", "default_port")
|
||||
Reference in New Issue
Block a user