deploying storage
adventau
HOBBYOP

10 months ago

Hi! I have a Python project on Railway that runs both a Discord bot and a Flask OAuth server. The OAuth flow stores authorized users in a JSON file, but every time I redeploy, that JSON resets and the user data is lost. How can I persist this file across deployments?

Closed

10 Replies

10 months ago

u need to right click and add a storage to your app


10 months ago

1448544227381481547


10 months ago

then attach it to your service (flask oauth) and set the directory you need to store it at respectively, ie /app/oauth


adventau
HOBBYOP

10 months ago

1448544401101029550


adventau
HOBBYOP

10 months ago

okok


adventau
HOBBYOP

10 months ago

ill see if i can figure that out


10 months ago

thats any path you need to allow your flask to write into it basically


10 months ago

so it can be like /flask/oauth, /oauth, etc


10 months ago

in your flask app then write into that


adventau
HOBBYOP

10 months ago

thanks a lot got it done


Welcome!

Sign in to your Railway account to join the conversation.

Loading...