2 years 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?
201 Replies
2 years ago
you would need to first upload the file with this -
and then move the volume over to your service
2 years ago
yes, read the software's docs please -
2 years ago
You will need to move the volume over to your app
2 years ago
you can create whatever folder structure you want
2 years ago
not unless you want to
2 years ago
do what works best for you
2 years ago
disconnect it and connect it to your app's service
2 years ago
no it is not
2 years ago
gotcha
2 years ago
i dont see why you need to
2 years ago
wherever you uploaded it within the volume
2 years ago
the volume will be whereever you mount it
2 years ago
correct, nor would you want to
2 years ago
please read this -
but it still not being available to access on my app.
am i forgetting something?
2 years ago
have you carefully read its overview?
2 years ago
i'm sorry, i dont see the relevance to what i had just asked
2 years ago
please read the template overview
2 years ago
slow down, read it again
2 years ago
yes it does, slow down, read it again
2 years ago
you are skim reading it
2 years 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
2 years ago
you have that variable set to what value?
2 years ago
then the path you mounted the volume to or the path you are trying to read the file from is incorrect, or both
2 years ago
what did you mount the volume to
/app
inside the volume i created a folder called secrets and inside of it, file.json
2 years ago
^
2 years ago
you don't gain any problem solving abilities if I gave you all the simple answers
2 years ago
this is not a platform or anything specific to the platform, this is just simple file paths and such
2 years ago
nothing Railway specific
so why does it work when i create the file manually but not when i use this volume stuff?
2 years ago
because you are doing something incorrectly
2 years ago
^
if i am, it is related to the volume, not to the app, the app is working correctly
2 years 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.
2 years ago
yep
2 years ago
if you set that variable, yes, though I haven't looked at your filebrowser service to verify if you did
2 years 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.
2 years ago
a folder named /app is not specific to Railway
2 years ago
^
2 years ago
... have you moved the volume over yet?
2 years ago
let's see
2 years ago
i mean, that's definitely a volume, but is it the volume that was attached to the filebrowser?
2 years ago
what did your app fail with
2 years ago
(the file provided by you)
2 years ago
did you put it on the volume?
2 years ago
then it's on the volume
2 years ago
they came from the filebrowser software
2 years ago
well lost+found is a linux thing, but that's besides the point
2 years ago
right
2 years ago
yes it does
2 years ago
right
2 years ago
^
2 years 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.2 years ago
did you tell me that you needed that file during build?
2 years ago
I get so many people using failed builds as a generic term for a crash at any stage, specifics are key
2 years ago
alright, how big is that file
2 years ago
since when are they that large?
2 years 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
2 years ago
just a thought, I forget how large variables can be, I think that should fit
2 years ago
why not?
2 years ago
oh you said you don't like your idea, try mine
2 years ago
yes
2 years ago
2.34kb worth of data should fit into a variable, but don't quote me on that
2 years ago
see what happens, it can't hurt
2 years ago
if you break railway I won't hold you accountable
2 years ago
well it's a good thing we don't bill for variables
2 years ago
I sure hope not











