Message: After creating a function using the Functions API, the domain is not created automatically, even though the documentation says a domain should be created after each deployment.
What I did:
Connected GitHub, got the installationId and repositoryId.
Successfully uploaded the function and deployed it.
However, the domain was not created, I had to create it manually.
I also tried uploading via file (Manual), and again the domain was not created.
I checked that when I create a function via the UI, the domain is created automatically. But when using the API, I need to create the domain manually and then redeploy.
My question: Is this the expected behavior, or am I doing something wrong in my code? If this is how it’s supposed to work, that’s fine — I’ll just create the domain manually.
Code:
const myFunc = await functions.create({
functionId: ID.unique(),
name: "My Function 3",
runtime: "node-18.0",
execute: [],
scopes: ["users.read"],
installationId: "",
providerRepositoryId: "",
providerBranch: "main",
providerRootDirectory: "./",
providerSilentMode: false,
entrypoint: "src/index.js",
commands: "npm install",
})
const myDeployment = await functions.createVcsDeployment({
functionId: myFunc.$id,
type: "branch",
reference: "main",
activate: true, // optional
});
Recommended threads
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!
- One-time Cloud migration blocked by data...
Hi, I’m blocked on a one-time migration from Appwrite Cloud to my self-hosted Appwrite instance. We already fixed the region issue, and the migration now corre...
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...