openimsdk / openim-docker

openim-docker configuration for deploying OpenIM. Provides a build solution for a stable distribution, as well as a docker compose deployment strategy
https://openim.io
Apache License 2.0
36 stars 46 forks source link

[Other]: How to customize the api url #51

Closed linyouye closed 4 months ago

linyouye commented 9 months ago

What would you like to share?

I deplyed the V3.4 by docker When I open ther Admin Web and try to login,It reports a CORS ERROR.

Because the Admin Web use port 10002, but api port is 10009

How can I customize the API URL

图片

Additional information

No response

cubxxw commented 9 months ago

Hi @linyouye,

Thank you for bringing this issue to our attention.

To customize the API URL, you can modify the API_URL variable in the Admin Web's source code to match the API's port number. You can find the source code in the admin-web folder of the OpenIM project.

[!WARNING] Please be advised that starting from version 3.4, the `OPENIM_API variable is being used to set the internal or external IP address for the openim module. For more detailed information, please refer to the documentation available at https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md. Thank you for your attention. eg:

export OPENIM_API="192.28.3.2"
make init 

After modifying the source code, you need to rebuild the Admin Web and redeploy it to reflect the changes.

Let me know if you have any further questions or concerns.

Best regards,

Sylariam commented 8 months ago

Hi @linyouye,

Thank you for bringing this issue to our attention.

To customize the API URL, you can modify the API_URL variable in the Admin Web's source code to match the API's port number. You can find the source code in the admin-web folder of the OpenIM project.

Warning

Please be advised that starting from version 3.4, the `OPENIM_API variable is being used to set the internal or external IP address for the openim module. For more detailed information, please refer to the documentation available at https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md. Thank you for your attention. eg:

export OPENIM_API="192.28.3.2"
make init 

After modifying the source code, you need to rebuild the Admin Web and redeploy it to reflect the changes.

Let me know if you have any further questions or concerns.

Best regards,

where can I find the source code exactly?

cubxxw commented 8 months ago

@Sylariam https://github.com/openimsdk/open-im-server/blob/main/scripts/install/environment.sh

Sylariam commented 8 months ago

@cubxxw Sorry. I mean the admin-web's source code.

cubxxw commented 7 months ago

The management backend and frontend are not open source. @Sylariam

kubbot commented 5 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

skiffer-git commented 4 months ago

The Docker deployment plan has been fully upgraded. Please refer to the README for the new scheme. The new scheme is simpler to use and supports Linux, Windows, and Mac.