Web Developer
Hi, I have self-hosted Appwrite v1.7.4 and the latest Appwrite CLI.
I cannot get the "variables" in the appwrite.json to deploy.
I am using this format:
"path": "functions/my-node-function",
"variables": {
"API_KEY": "your-secret-api-key",
"DATABASE_URL": "your-database-connection-string",
"NODE_ENV": "production"
}
So, yes, specifying the variables as an object and not an array.
Everything else from the appwrite.json deploys fine.
I have seen that this was previously a bug reported by others. Has the bug been reintroduced?
I am using Node.js v22.0 and JavaScript for functions (Node 22 support added in the Appwrite, self-hosted docker .env file)
As a workaround, I have set the variables in the Project Settings - Global variables, which then apply to all functions, but I would like to set these granularly per function on initial deployment (without subsequently applying variables with the CLI and needing another deployment to apply them).
Have I missed anything by chance?