I deploy my functions with the command `appwrite deploy function' and than i select my function i want to deploy.
My Problem is, that after that i have to go to the cloud console and reupload the .env file. The .env file holds the information i need for the dart server runtime
Is ist possible to upload the file using the appwrite cli?
Another solution which would fit me is that my dart function is deployed with the .env file which i put in the correct place.
Summary
The user is having trouble with storing secrets in the appwrite.json file because they want to track it with git. They are using an env file instead. They are asking if it's possible to upload the .env file using the appwrite CLI. Another solution they mentioned is deploying the dart function with the .env file in the correct place.
Solution: It is suggested to put the variables in the appwrite.json file. The user can skip overriding the variables. They should also check their CLI version. Unfortunately, it is not clear if there is a solution for uploading the .env file using the appwrite CLI.
Drake
Aug 18, 2023, 16:18
you can put your variables in your appwrite.json file.
also, you should be able to skip overriding the variables...what version of the CLI do you have?
Super_Nove
Rank 1: Thread
Aug 18, 2023, 16:58
my cli version is: 2.0.2
Drake
Aug 18, 2023, 17:00
doesn't it prompt you about variables?
Super_Nove
Rank 1: Thread
Aug 18, 2023, 17:01
no it just ask me what function i want to deploy. (if you mean that, otherwise i did not understand you) :D
Drake
Aug 18, 2023, 17:06
Super_Nove
Rank 1: Thread
Aug 18, 2023, 18:32
I did not specify the variables attribute of appwrite.json so it did not ask me.
Thanks for the great support
Drake
Aug 18, 2023, 18:46
that said, it shouldn't have wiped the variables on your server 🧐
Super_Nove
Rank 1: Thread
Aug 18, 2023, 19:12
luckily it did not :D
Drake
Aug 18, 2023, 19:13
Oh why did you have to upload the .env file? Because you needed to update some values?
Super_Nove
Rank 1: Thread
Aug 18, 2023, 19:17
yeah i needed to update some values and I am using the env file because i can put it in my gitignore.
Thats the problem I am having with puttin my secrets in appwrite.json file because i want to track this file with git.
Drake
Aug 18, 2023, 19:29
I use a default one that I check in to version control and I ignore the actual json one.