Rank 2: Process
_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
Votes
0
Replies
19
Participants
2
Messages
20
Rank 2: Process
_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
Rank 2: Process
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?
Rank 2: Process
If i deploy functions multiple times wont it add up space on the cloud?
Rank 2: Process
I intended cloud to be only for the user uploads
Rank 2: Process
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
Rank 2: Process
Do u know how to do it
Rank 2: Process
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
Rank 2: Process
Okyyy
Rank 2: Process
Thanks