Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with full RAG and AI Agent capabilities.
https://anythingllm.com
MIT License
21.22k stars 2.2k forks source link

[DOCS]: digitalocean/terraform: .env file not passed to deployed instance #1976

Closed tertek closed 1 month ago

tertek commented 1 month ago

How are you running AnythingLLM?

Docker (remote machine)

What happened?

I have followed the guide to deploy to DO via Terraform. I have created .env file from example and added relevant variables. Terraform creates the instance. But when I ssh into the droplet and run cat /home/anythingllm/.env there is no output at all. When I access the application on port 3001, I need to go through onboarding.

Are there known steps to reproduce?

Follow instructions on https://github.com/Mintplex-Labs/anything-llm/blob/master/cloud-deployments/digitalocean/terraform/DEPLOY.md

timothycarambat commented 1 month ago

When I access the application on port 3001, I need to go through onboarding.

You should always go through onboarding on the first boot - this is not unexpected behavior?

tertek commented 1 month ago

When I access the application on port 3001, I need to go through onboarding.

You should always go through onboarding on the first boot - this is not unexpected behavior?

Thank you for letting me clarify: Yes, onboarding is expected behaviour BUT there are no values taken from .env, hence the onboarding is default.I suppose in case the .env is populated as expected, than onboarding should only ask for values that are missing?

The actual issue is that terraform somehow does not pass the /docker/.env to the instances working directory. Relevant code is here but I am not proficient with terraform as well, so maybe someone else knows what is odd here:

https://github.com/Mintplex-Labs/anything-llm/blob/296f04156455346a35cec4440239325523265d33/cloud-deployments/digitalocean/terraform/main.tf#L29-L49

saravanan30erd commented 1 month ago

@tertek created a quick fix here https://github.com/Mintplex-Labs/anything-llm/pull/2075 could you please test it now and let me know?

tertek commented 1 month ago

@saravanan30erd tested and it worked. Thanks. Closing this the PR will follow up on this.