-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
chore: add .env.example and update docker-compose.yaml #5339
Conversation
- Added .env.example file to provide a template for environment variable configuration. - Modified docker-compose.yaml to streamline configuration management by using environment variables. Fixes langgenius#5249
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good pr, but you need to move the comments to .env.examaple
as well.
See this one as well #4299 If you would like to discuss about this pr, you can add my wechat: crazyphage. |
…docker-compose deployment
Hi @takatost, @guchenhe, and @crazywoola , 👋 I'd really appreciate it if you could take a few minutes to look over this PR. Your feedback is invaluable to me! 🙏 |
Hi @Tian-Hun, great to see a new contributor! I have some feedback I want to share. It is a good idea to de-duplicate entries, but I think moving some variables to a It will make it more complicated to help users set up Dify if we need to check whether a variable is in a I think if we refactor it this way, we should move all variables to Let me know what you think about my thoughts. By the way, thanks for taking the time to contribute! |
Hi @perzeuss, Thank you for your valuable feedback! I understand your concern about introducing two different ways to configure Dify. The initial intention of splitting environment variables was to streamline the setup process for new users. By separating frequently changed and personalized variables into a Additionally, by keeping the While centralizing all variables in I propose we explore a hybrid approach that combines the best of both worlds. We could keep essential, non-sensitive variables in the I'm confident that by collaborating and considering all perspectives, we can find an optimal solution that prioritizes both user-friendliness and maintainability. Thank you again for your insights and for taking the time to contribute to this discussion! |
Description
Fixes #5249
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
To verify the changes introduced in this pull request, the following tests were performed:
Environment Variable Validation:
docker-compose.yaml
now references environment variables from the new.env.example
file. These environment variables were set with representative values in a local.env
file to ensure that the Docker Compose services start up correctly and can access the necessary configuration..env
file in the same directory asdocker-compose.yaml
..env
file with the values for your environment variables (following the structure provided in.env.example
).docker-compose up
to start the services.Configuration File Validation:
docker-compose.yaml
file was manually reviewed to ensure that all environment variable references are correct and that the overall configuration structure aligns with the intended changes.docker-compose.yaml
file and verify that all environment variable placeholders (e.g.,${VARIABLE}
) are replaced with the correct values from your.env
file.Test Configuration:
v2.15.1
macOS Sonoma 14.5
Additional Notes:
Suggested Checklist:
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsoptional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changes