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
- Error upgrading from 1.8.1 to 1.9.0
DO Self-hosted server failed to upgrade with this error "Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.42". U...
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...
- Static IP for security purpose!
Hey I am hosting a next.js project in appwrite it reaches out to mongo DB to fetch data The only option to enable network access to 0.0.0.0/0 in mongo DB (any ...