41 minutes ago
Hello Railway team,
I am running a Railway Function using Bun on the Hobby plan and would like to migrate the complete application source code into a private GitHub repository.
The application currently consists of a main TypeScript file and multiple external JavaScript code fragments stored as service variables. These fragments are required for the application to start correctly.
I have already successfully backed up the main Function source file and some additional code fragments. However, several required source dependencies are still missing.
The connected Railway integration provides access to the Function source code and variable names, but variable values are redacted.
A previous automated support response recommended railway functions link and railway functions pull. These commands have not been tested yet because the main Function source file is already available.
My questions are:
- Does
railway functions pullretrieve only the main source file or also its external code dependencies? - Is there an officially supported way to export all application code without exposing credentials, API keys or sensitive configuration?
- What is the recommended migration procedure for converting this architecture into a conventional, independently runnable GitHub repository?
- Can this be achieved on the Hobby plan without restarting or redeploying the production service?
The existing application is currently running successfully and must remain operational throughout this process.
My requirements are no downtime, no data loss, no exposure of credentials and no additional costs.
A concrete step-by-step technical solution would be greatly appreciated.
Thank you!
1 Reply
39 minutes ago
Your service runs as a Bun Function, and its main source is the supported part. The application code stored across its variables is not a supported way to ship code, so moving it into a repository is the right direction.
We can't confirm that railway functions pull includes code held in variables, so don't rely on it for those fragments. If you run it, check whether the output contains anything beyond the main Function file.
The variable values are readable from your own dashboard: open an earlier deployment of the service and its Details tab lists each variable with the value that deployment ran with, as long as you have member or admin access. Copy the code fragments from there into files in your private repository, and keep API keys and other secrets out of the repo as variables.
Before pointing production at the new setup, validate the repository build in a separate, isolated service or environment and confirm the app starts and behaves correctly there. Your existing deployment keeps running while you do that, and no plan change is needed for this migration.
Status changed to Awaiting User Response Railway • 39 minutes ago