Skip to content

[Bug] docker-compose sets ORNN_API_BASE_URL with a /api/v1 suffix — SPA composes /api/v1/api/v1/* #1216

Description

@chronoai-shining

Problem

docker-compose.yml configures the web container with:

ORNN_API_BASE_URL: "http://localhost:3802/api/v1"

But every ornn-web call site appends the version segment itself. ornn-web/src/config.ts:80 only strips a trailing slash and hands the value through as config.apiBaseUrl; the services then do:

// ornn-web/src/services/skillApi.ts:124
fetch(`${API_BASE}/api/v1/skills${params}`, ...)
// also activityApi.ts:48, generateStreamApi.ts:42,
//      assistantStreamApi.ts:61, playgroundStreamApi.ts:53

So compose-based local dev composes http://localhost:3802/api/v1/api/v1/skills and every API call 404s.

deployment/.env.sample.ornn has it right — no /api/v1 suffix — which is why the K8s path works and only the compose path is broken.

Fix

ORNN_API_BASE_URL: "http://localhost:3802"

Notes

Found while fixing #1213. Not bundled into that PR — different file, different failure mode, and that PR is already carrying two issues.

#1213 adds a comment to deployment/.env.sample.ornn stating the no-suffix contract explicitly, which should stop this recurring.

Related to #1213.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingdxDeveloper experienceinfraInfrastructure & deploymentpriority:P2Normal. Default priority.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions