I am trying to mount a volume to my app that way it can save a screenshot for debugging purposes

I don't know what path I should set the screenshots to save to, or what path to mount the volume at. I'm not very experienced with volumes and would appreciate some help
Solution:
if your app is built via nixpacks then your app's work directory will be /app if you're storing your images in a folder named images in your app's root directory then you'll want to mount the volume to /app/images...
Jump to solution
8 Replies
Percy
Percy4mo ago
Project ID: N/A
celebrations
celebrationsOP4mo ago
n/a
celebrations
celebrationsOP4mo ago
I tried mounting it to /data and saving the screenshot to /data/error.png but now I'm getting this weird error
No description
Solution
Fragly
Fragly4mo ago
if your app is built via nixpacks then your app's work directory will be /app if you're storing your images in a folder named images in your app's root directory then you'll want to mount the volume to /app/images
celebrations
celebrationsOP4mo ago
alr let me try I'm getting this really weird error that I don't get locally. Im not even sure where its coming from because the print statements at the beginning of the app havent even been logged.
celebrations
celebrationsOP4mo ago
No description
celebrations
celebrationsOP4mo ago
these errors go away completely when i remove the volume I even removed any references to the volume's filepath. As soon as I attach the volume, it starts crashing.
raf
raf4mo ago
since it was unhandled error, try using .catch(console.error) to log the error and knows what's going on
Want results from more Discord servers?
Add your server