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
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- local build `composer installer:dev` iss...
setup - dev container (default linux universal) WSL (test with gh codespace too) - php 8.5.7 - all extensions installed - `composer install` fine - `composer...
- Suspicious access pattern detected when ...
Hello, I am having trouble restoring my project. In the past it worked with no problems, but today I get an error "Suspicious access pattern detected". How can ...