Dokploy / dokploy

Open Source Alternative to Vercel, Netlify and Heroku.
https://dokploy.com/
Other
9.39k stars 464 forks source link

After modifying the env information and saving it, it seems that the changes are not taking effect in the backend #698

Closed changjiong closed 1 week ago

changjiong commented 1 week ago

To Reproduce

  1. Create a new compose application and save the env information.
  2. After updating the environment information, restart the container.
  3. The new env are not taking effect

Current vs. Expected behavior

I want to modify the env and pass new information, but it doesn't seem to take effect.

Provide environment information

"Ubuntu 24.04.1 LTS"

Which area(s) are affected? (Select all that apply)

Docker Compose

Additional context

No response

kerimovok commented 1 week ago

I think you need to rebuild it because frameworks are reading env variables once when the application is bootstrapping.

Siumauricio commented 1 week ago

you are correct @kerimovok, this is not a bug you need to deploy or rebuild again to make the new enviroment variables take effect

changjiong commented 1 week ago

I am deploying lobe-chat-database using Docker Compose in dokploy, which includes four services: lobechat, postgresql, minio_s3, and logto_auth. These services have dependencies among them; lobechat relies on secret keys generated by minio_s3 and logto. When I redeploy, all services in Docker Compose are reset, requiring the keys to be regenerated. This results in keys that are different from those in the previous environment, seemingly creating a loop.

changjiong commented 1 week ago

Finally, I carefully reviewed the document and attempted file persistence. I utilized the ../file prefix within the volume. This facilitates the retention of previously generated keys, allowing for their reading upon redeployment instead of regeneration. Thank you for your insights.