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

When starting v0.14.0 with Docker Compose, the tidb container is started, and port 4000 is exposed #11708

Open
5 tasks done
gakugaku opened this issue Dec 16, 2024 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@gakugaku
Copy link

gakugaku commented Dec 16, 2024

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.14.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Start Dify v0.14.0 using Docker Compose.

✔️ Expected Behavior

Ports should not be exposed unnecessarily. If it is necessary to expose a port, users should be able to change the port number. Containers that are not required for production environments should not be started.

❌ Actual Behavior

The tidb container is started regardless of the profile, and port 4000 is exposed. If port 4000 is already in use, an error occurs.

# The TiDB vector store.
# For production use, please refer to https://github.com/pingcap/tidb-docker-compose
tidb:
image: pingcap/tidb:v8.4.0
ports:
- "4000:4000"
command:
- --store=unistore
restart: always

This behavior was introduced by #11645.

Workarounds

Without modifying the docker-compose.yaml file, you can use the --scale option to prevent the tidb container from starting:

docker compose up -d --scale tidb=0
@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 16, 2024
Copy link

dosubot bot commented Dec 16, 2024

To prevent the tidb container from exposing port 4000 in the Docker Compose setup for Dify v0.14.0, you can modify the docker-compose.yaml file. Specifically, you should comment out or remove the line that maps port 4000 in the tidb service configuration:

tidb:
  image: pingcap/tidb:v8.4.0
  # Comment out or remove the following line to not expose port 4000
  # ports:
  #   - "4000:4000"
  command:
    - --store=unistore
  restart: always

By doing this, the tidb container will not expose port 4000 to the host, which should help avoid conflicts if port 4000 is already in use [1].

Additionally, if you want to prevent the tidb container from starting in certain profiles, you might need to adjust the Docker Compose setup to include profile-specific configurations. However, the current setup does not provide a specific profile to exclude tidb, so you may need to manually manage this by editing the docker-compose.yaml file or using environment variables to control which services are started.

To continue talking to Dosu, mention @dosu.


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

@crazywoola
Copy link
Member

@bowenliang123

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