After changing .env file, new setting not apply
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.3.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Hi All, I had changed the setting in .env file, the variables of CODE_MAX_STRING_LENGTH amended After that the new setting still not apply
The procedure:
- Docker Compose Down
- Amend .env file
- Docker compose -f dock-compose.yaml up -d
What is the issue?
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
To ensure that changes to the .env file are applied correctly, you should follow these steps:
-
Stop the Docker Containers: Use
docker compose downto stop the running containers. -
Edit the
.envFile: Make the necessary changes to the.envfile, such as updating theCODE_MAX_STRING_LENGTHvariable. -
Rebuild and Restart the Docker Containers: Use the following commands to rebuild and restart the containers, ensuring that the changes are applied:
docker compose up --build -d
This process ensures that the environment variables are reloaded and applied to the Docker containers. Simply using docker compose up -d without the --build option might not apply changes if the images are not rebuilt [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
Which feature do you want to choose, I am not sure if you have changed the right env variable.
I have changed CODE_MAX_STRING_ARRAY_LENGTH to 50, and this feature working as expected.