Back

Ignore files and directories on cli function deploy

  • 0
  • Self Hosted
  • Functions
  • General
  • Locale
antonio84
8 Sep, 2023, 16:45

Hello, when I deploy a function with appwrite CLI with this command: appwrite functions createDeployment --functionId=myfunc --entrypoint='main.py' --code="." --activate=true how can I ignore files and directories?

TL;DR
You should use `appwrite deploy function` instead of `appwrite functions createDeployment`. The `deploy function` command respects the `appwrite.json` and `.gitignore` files to ignore files and directories. Make sure your function is included in the `appwrite.json` file. If the ignore feature is not working, try updating your Appwrite CLI version or check if there is an issue with your `.gitignore` file.
antonio84
8 Sep, 2023, 16:56

ignore is not working

Drake
8 Sep, 2023, 16:57

do you have your function in the appwrite.json file?

antonio84
8 Sep, 2023, 17:51

yes

Drake
8 Sep, 2023, 18:15

i highly suggest using appwrite deploy function instead of appwrite functions createDeployment. deploy function should ignore things based on the appwrite.json and gitignore

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more