
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.

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?

my cli version is: 2.0.2

doesn't it prompt you about variables?

no it just ask me what function i want to deploy. (if you mean that, otherwise i did not understand you) :D


I did not specify the variables attribute of appwrite.json so it did not ask me.
Thanks for the great support

that said, it shouldn't have wiped the variables on your server 🧐

luckily it did not :D

Oh why did you have to upload the .env file? Because you needed to update some values?

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.

I use a default one that I check in to version control and I ignore the actual json one.
https://github.com/stnguyen90/places/blob/main/appwrite.json.default

Thanks I will give it a try
Recommended threads
- Create owner team member with Server fun...
I understand that when creating a team with a function, the user that made the request will not be the owner so I think I have to add the user that did the requ...
- Schedule a function job with timezone
I am aware that cron schedule will work on UTC timezone. I would like to run my function at a particular time everyday in new york time. If I use UTC, it will m...
- Appwrite processing global envs and chan...
So I define a global env - GCP_CREDENTIALS in global env of my appwrite projcet and refer to it in my functions as ```gcp_creds: JSON.PARSE(GCP_CREDENTIALS)```...
