docker icon indicating copy to clipboard operation
docker copied to clipboard

Docker server sending back localhost

Open fvlasie opened this issue 1 year ago • 2 comments

Describe the bug Spacebarchat-server run from Docker sends back localhost:3001 for the instance URLs which causes network errors when connecting from thh eclient.

Expected behavior The server should send back URLs matching the domain entered into the client's "Instance" field.

Console Logs Connect error: POST http://localhost:3001/api//auth/login

The docker-compose.prod.yaml does not contain environment variables for instance URLs.

Is there another way to that these are supposed to be set? I may be blind but I could not find any references to setting instance URLs for the server in the documentation.

fvlasie avatar Jul 07 '24 21:07 fvlasie

same issue here

sIush avatar Sep 17 '24 19:09 sIush

You need to define the public API URL in the config since it defaults to localhost:3001 inside a container.

https://docs.spacebar.chat/setup/server/configuration/#available-configuration-options api_endpointPublic

If you're running in database mode, it'll be in the config table

SupremeMortal avatar Sep 17 '24 22:09 SupremeMortal