spacebarchat / docker

🐳 Spacebar's Docker images and composing
GNU Affero General Public License v3.0
26 stars 11 forks source link

Docker server sending back localhost #20

Open fvlasie opened 4 months ago

fvlasie commented 4 months ago

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.

sIush commented 1 month ago

same issue here

SupremeMortal commented 1 month ago

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