#Storage Volume Help
21 messages · Page 1 of 1 (latest)
Project ID: 28af0e25-6b53-46d0-80d5-b5dc38b521a0
The volume environment variables are injected to your service by default.
More docs on Volumes here https://docs.railway.app/reference/volumes
Also, I found I found with some projects that if I don’t mount a volume to /app/<mount_point> I can’t write to them. Maybe it’s just me and the languages I use
I'm happy to report theres no issues with the mount point with go apps
Oh cool. Good to know
if you mount to /data you must write to /data the starting forward slash is very important
you don't want to use relative paths
/data/text.txt
vin help
It’s an absolute path. It states from the root go into data
that's the word I was looking for
A relative path is what you have where it will look for the data folder next to your binary
And your binary lives in /app/
Use the same path in the read as well
But yes, that should read and write
I can confirm that's how it works
oh yeah
one sec
i thought for a sec that writefile doesnt create the file if it doesnt exist
but the volume didnt exist lol
🎉