I am using s3 for app storage but is it possible to keep the build function stuff to local storage?
- 0
- 2
- Self Hosted
- Functions
- Sites
- Storage
_APP_STORAGE_DEVICE=s3 puts everything to the s3 storage but i need to be able to keep the function builds and site in the local and not waste the cloud storage for it
If I set this OPR_EXECUTOR_STORAGE_DEVICE=local does it work?
we recommend not using OPR_* env now and kind of deprecated them from executor depending on which version of executor is being used
any reason why you want builds to be local only?
If i deploy functions multiple times wont it add up space on the cloud?
I intended cloud to be only for the user uploads
to appwrite storage buckets
you can use deploymentRetention
uh wait no available on self hosted yet
so ig a manual cron job to delete the older builds?
generally its better practice to use s3 for builds etc. local storage was just in case you didnt have s3 set
it is, i'm using it (1.9.0) π for some reason it's not visible in the UI but configurable with the config.json of the function
Do u know how to do it
How do i do it
my appwrite.json / appwrite.config.json (iirc the second name is the newest)
{
"projectId": "XXX",
"functions": [
{
"$id": "YYY",
"name": "Template",
"runtime": "node-22",
"buildSpecification": "s-1vcpu-512mb",
"runtimeSpecification": "s-0.5vcpu-512mb",
"deploymentRetention": 7,
"execute": [],
"events": [],
"scopes": [
"databases.read"
],
"schedule": "",
"timeout": 15,
"enabled": true,
"logging": true,
"entrypoint": "lib/main.js",
"commands": "npm ci --omit=dev",
"path": ".",
"ignore": [
"node_modules",
".git",
".gitignore",
"tsconfig.json",
"tsconfig.build.json",
"README.md",
".gitlab-ci.yml",
".gitlab",
"src"
]
}
]
}
it's "deploymentRetention": 7, to keep them for 7 days before removing the deployment
then you just push the function from the CLI and it will ask to push the properties as well
also if you run from a CI i would recommend using the --activate true to activate the deployment
Okyyy
Thanks
Recommended threads
- Appwrite-injected variables are not avai...
I am using rust-1.83 as a runtime and try to access APPWRITE_FUNCTION_API_ENDPOINT or APPWRITE_FUNCTION_API_KEY during runtime. Both are not set during my execu...
- OAuth Missing redirect URL
Hello all, on a Flutter mobile app with latest Appwrite dependency (25.4.0) I always got "Missing redirect URL" - "Your OAuth login flow is missing a proper red...
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...