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:
@@ -19,6 +19,7 @@ class ToolType(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
||||
description: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
category: Mapped[str] = mapped_column(String(50), nullable=False, default="other")
|
||||
interfaces: Mapped[list[str]] = mapped_column(JSON, default=list, nullable=False)
|
||||
default_port: Mapped[int | None] = mapped_column(nullable=True)
|
||||
compose_template: Mapped[str] = mapped_column(Text, nullable=False)
|
||||
required_variables: Mapped[list[str]] = mapped_column(JSON, default=list, nullable=False)
|
||||
is_builtin: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user