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

deploy without middleware #13079

Closed
4 tasks done
ddbdd opened this issue Jan 27, 2025 · 2 comments
Closed
4 tasks done

deploy without middleware #13079

ddbdd opened this issue Jan 27, 2025 · 2 comments
Labels
🌚 invalid This doesn't seem right

Comments

@ddbdd
Copy link

ddbdd commented Jan 27, 2025

Self Checks

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

Provide a description of requested docs changes

Hello. If I already have nginx, postgres, redis running on my server and using the default port, what are the best practices for deploying dify through docker? Which location configurations need to be modified? Can I delete the middleware configuration in docker-compose? How do I need to initialize the database?

@dosubot dosubot bot added the 📚 documentation Improvements or additions to documentation label Jan 27, 2025
Copy link

dosubot bot commented Jan 27, 2025

Hello @ddbdd! I'm here to help you with any questions or issues you have. I'm a bot designed to assist with bug fixes, answer questions, and support your contributions while waiting for a human maintainer. Feel free to ask me anything!

To deploy Dify using Docker while utilizing your existing nginx, PostgreSQL, and Redis services, follow these best practices:

  1. Modify Environment Variables:

    • For PostgreSQL, update the following environment variables in your Docker setup to point to your existing database:
      DB_USERNAME: your_db_username
      DB_PASSWORD: your_db_password
      DB_HOST: your_db_host
      DB_PORT: your_db_port
      DB_DATABASE: your_db_name
    • For Redis, set these environment variables to connect to your existing Redis service:
      REDIS_HOST: your_redis_host
      REDIS_PORT: your_redis_port
      REDIS_PASSWORD: your_redis_password
  2. Nginx Configuration:

    • If you are using an existing nginx service, you can remove or ignore the nginx configuration in the Docker setup. Ensure that your existing nginx is configured to route traffic to the Dify application.
  3. Middleware Configuration:

    • You can remove the middleware configuration from the docker-compose file if you are not using the middleware services provided by Dify.
  4. Initialize the Database:

    • After configuring the environment variables, initialize the database by running the database migration command:
      poetry run python -m flask db upgrade

These steps will help you integrate Dify with your existing services effectively.

To continue talking to Dosu, mention @dosu.


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

@crazywoola crazywoola closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
@crazywoola
Copy link
Member

We have already provided various optimal solutions, including Docker and source code startup. It is impossible for us to provide optimal support for every unique method. What you need to do is understand the logic of running these services directly, which can be achieved by reading the code.

@crazywoola crazywoola added 🌚 invalid This doesn't seem right and removed 📚 documentation Improvements or additions to documentation labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌚 invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants