Railway#
Railway is a platform that allows you to deploy applications easily. It provides a simple way to host your applications and manage their deployments.
Railway is connected to Github : all changes pushed to Github repo branch 'master' are deployed immediately (+/-) to Railway 'entan-mkdocs', where the 'main.py' file is the entry point.
Using a dockerfile to drive the build#
Railway CLI#
Installation#
scoop install railway
Using it#
The Railway CLI is used to:
- link the local project to a Railway project:
railway login railway link - run the app localy with the Railway project environment variables:
railway run python main.py
Resend api key#
On the entan-mkdocs service in Railway, define the variable 'RESEND_API_KEY'
How to access a railway volume by installing a file browser ?#
You can use a pre-made Filebrowser template service on Railway to inspect and download files from an existing volume. Below is a stepbystep workflow tailored to a single volume you already use in a project.
Concept#
Railway volumes are mounted into a service at a mount path (for example /app/storage), and appear there as a normal directory. The Volume File Browser template is a small helper service that mounts that same volume at /data and exposes a web UI where you can browse and download files.
Preparation#
-
Open the Railway project that contains the service currently using the volume you want to inspect.
-
Rightclick the volume, choose View settings, and note its current mount path (for example /permanent), because you need this later to restore it.
Add the Volume File Browser service#
-
In the same project, click the + New button and search for Volume File Browser, then add it as a new service.
-
In your original service that currently has the volume attached, remove the active deployment (threedot menu Remove) so it will not keep trying to access the volume.
Temporarily move the volume to the browser#
-
Rightclick the volume and choose Disconnect to detach it from the original service.
-
Click the nowdisconnected volume, then click Mount and select the Volume File Browser service as the destination.
-
Use /permanent as the mount path for the file browser service and wait for that service to redeploy.
Log in and browse files#
-
Open the Variables tab for the Volume File Browser service and note the automatically generated basicauth username and password.
-
Click the Railwayprovided domain of the Volume File Browser service, log in with those credentials, and you will see the files from the volume under /permanent.
-
Upload/Download any files you need directly through this interface.
Restore the volume to your app#
-
Disconnect the volume from the Volume File Browser service once done.
-
Remount the volume back to the original service, using the original mount path you wrote down earlier (for example /permanent).
-
Redeploy the original service so it starts again with the volume attached.