9 months ago
I am using firebase to upload images and firebase have a specific way of doing things, that is upload a file with the certification config.
This file, of course, have sensible data. How can I upload files like this without pushing it to my project?
0 Replies
9 months ago
you would need to first upload the file with this -
and then move the volume over to your service
9 months ago
yes, read the software's docs please -
9 months ago
You will need to move the volume over to your app
9 months ago
you can create whatever folder structure you want
9 months ago
not unless you want to
9 months ago
do what works best for you
9 months ago
disconnect it and connect it to your app's service
9 months ago
no it is not
9 months ago
gotcha
9 months ago
i dont see why you need to
9 months ago
wherever you uploaded it within the volume
9 months ago
the volume will be whereever you mount it
9 months ago
correct, nor would you want to
9 months ago
please read this -
but it still not being available to access on my app.
am i forgetting something?
9 months ago
have you carefully read its overview?
9 months ago
i'm sorry, i dont see the relevance to what i had just asked
9 months ago
please read the template overview
9 months ago
slow down, read it again
9 months ago
yes it does, slow down, read it again
9 months ago
you are skim reading it
9 months ago
to be clear, you should be reading this -
were you talking about this part?
By default, the storage location is set to the storage subdirectory in the root of the volume, but by setting a service variable USE_VOLUME_ROOT to 1 you can opt to use the root of the volume as the storage location instead
9 months ago
you have that variable set to what value?
9 months ago
then the path you mounted the volume to or the path you are trying to read the file from is incorrect, or both
9 months ago
what did you mount the volume to
/app
inside the volume i created a folder called secrets and inside of it, file.json
9 months ago
^
9 months ago
you don't gain any problem solving abilities if I gave you all the simple answers
9 months ago
this is not a platform or anything specific to the platform, this is just simple file paths and such
9 months ago
nothing Railway specific
so why does it work when i create the file manually but not when i use this volume stuff?
9 months ago
because you are doing something incorrectly
9 months ago
^
if i am, it is related to the volume, not to the app, the app is working correctly
9 months ago
volume's are nothing special, it's simply a place to store files
Nixpacks, the default buildpack used by Railway, puts your application files in an /app folder at the root of the container. If your application writes to a directory at a relative path, and you need to persist that data on the volume, your mount path should include the app path.
9 months ago
yep
9 months ago
if you set that variable, yes, though I haven't looked at your filebrowser service to verify if you did
9 months ago
that variable is specific to my filebrowser template, not railway, using correct file paths is not specific to railway either.
I recommend you read our guide again and read up on how file paths work in general.
keep trying, you will get there, and learn a new skill in the end.
9 months ago
a folder named /app is not specific to Railway
9 months ago
^
9 months ago
… have you moved the volume over yet?
9 months ago
let's see
9 months ago
i mean, that's definitely a volume, but is it the volume that was attached to the filebrowser?
9 months ago
what did your app fail with
9 months ago
(the file provided by you)
9 months ago
did you put it on the volume?
9 months ago
then it's on the volume
9 months ago
they came from the filebrowser software
9 months ago
well lost+found is a linux thing, but that's besides the point
9 months ago
right
9 months ago
yes it does
9 months ago
right
9 months ago
^
9 months ago
did you use nixpacks?
Volume Availability
Volumes are mounted to your service's container when it is started, not during build time.
If you write data to a directory at build time, it will not persist on the volume, even if it writes to the directory to which you have mounted the volume.
Volumes are not mounted as overlays.
9 months ago
did you tell me that you needed that file during build?
9 months ago
I get so many people using failed builds as a generic term for a crash at any stage, specifics are key
9 months ago
alright, how big is that file
9 months ago
since when are they that large?
9 months ago
alright we'll try to base64 encode the json, set the base64 string as a variable, and then in code decode the base64 back into a string
9 months ago
just a thought, I forget how large variables can be, I think that should fit
9 months ago
why not?
9 months ago
oh you said you don't like your idea, try mine
9 months ago
yes
9 months ago
2.34kb worth of data should fit into a variable, but don't quote me on that
9 months ago
see what happens, it can't hurt
9 months ago
if you break railway I won't hold you accountable
9 months ago
well it's a good thing we don't bill for variables
9 months ago
I sure hope not