Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source code build Docker image front-end Settings -e CONSOLE_API_URL=http://127.0.0.1:5001 -e APP_API_URL=http://127.0.0.1:5001 is not valid #14395

Closed
4 of 5 tasks
1205469665 opened this issue Feb 26, 2025 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@1205469665
Copy link

1205469665 commented Feb 26, 2025

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Source code build Docker image front-end Settings

-e CONSOLE_API_URL=http://127.0.0.1:5001 -e APP_API_URL=http://127.0.0.1:5001 is not valid

Set to another IP address does not take effect and still access 127.0.0.1
run the docker run -itd -p 3000:3000 -e CONSOLE_API_URL=http://10.65.12.76:5001 -e APP_API_URL=http://10.65.12.76:5001 --name command dify-web-bash dify-api

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 26, 2025
Copy link

dosubot bot commented Feb 26, 2025

Hello @1205469665! I'm here to assist you with any bugs, questions, or contributions you need help with. Let's tackle this issue together!

To resolve the issue where setting a different IP address for the Docker image front-end settings does not take effect and still accesses 127.0.0.1, ensure that you are correctly setting the environment variables CONSOLE_API_URL and APP_API_URL with the desired IP address when running the Docker container. For example, modify the Docker run command like this:

docker run -it -p 3000:3000 -e CONSOLE_API_URL=http://<your-ip-address>:5001 -e APP_API_URL=http://<your-ip-address>:5001 langgenius/dify-web:latest

Replace <your-ip-address> with the actual IP address you want to use. This should ensure that the front-end accesses the specified IP address instead of 127.0.0.1 [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@1205469665
Copy link
Author

I used the source code to build a Docker image. The official website can be supported. But use source code to build not do not know why

@crazywoola
Copy link
Member

  web:
    image: langgenius/dify-web:0.15.3
    restart: always
    environment:
      CONSOLE_API_URL: ${CONSOLE_API_URL:-}
      APP_API_URL: ${APP_API_URL:-}
      SENTRY_DSN: ${WEB_SENTRY_DSN:-}
      NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0}
      TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000}
      CSP_WHITELIST: ${CSP_WHITELIST:-}
      MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
      MARKETPLACE_URL: ${MARKETPLACE_URL:-https://marketplace.dify.ai}
      TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-}
      INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-}
      PM2_INSTANCES: ${PM2_INSTANCES:-2}

The env settings are listed above.

Also this is an outdated version. We do not provide technical support for self built images, thanks for understandding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants