2 months ago
Hello, I need to download the source code files for my services likepluto-frontend and likepluto-backend. Please send me a ZIP archive of my deployed source folders.
Pinned Solution
2 months ago
Though if you used a Dockerfile, it's possible you can try to access the filebrowser via the Console tab and try to get your code back, if you used a COPY . . type of statement.
6 Replies
2 months ago
Railway does not store or provide downloadable copies of your deployed source code. Your source code lives in the Git repository (e.g. GitHub) you connected to each service, so you can clone or download it directly from there.
Status changed to Awaiting User Response Railway • about 2 months ago
Railway
Railway does not store or provide downloadable copies of your deployed source code. Your source code lives in the Git repository (e.g. GitHub) you connected to each service, so you can clone or download it directly from there.
2 months ago
No don't have, initially I have uploaded to Railway only. didn't connect with git
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago
2 months ago
If you lost a local copy of the code and didn't upload it to a VCS, you won't be able to restore it.
2 months ago
Though if you used a Dockerfile, it's possible you can try to access the filebrowser via the Console tab and try to get your code back, if you used a COPY . . type of statement.
No don't have, initially I have uploaded to Railway only. didn't connect with git
2 months ago
adding to what MOD said, if the code is still in the container there's a more reliable way to pull it out than the file browser.
temporarily change the service's start command to serve the app directory over http, then just download it from your public URL:
python3 -m http.server $PORT --directory /app
if it's a node image without python, npx -y serve -l $PORT /app does the same, or busybox httpd -f -p $PORT -h /app on alpine.
redeploy, open your service's public domain in a browser, and you can browse and download the whole tree. change the start command back when you're done.
two warnings: it'll be publicly accessible while it's running so do it quickly and remove it after, and don't do it if there are secrets in files rather than env vars. also don't redeploy from a fresh build in the meantime, if the image ever gets rebuilt without the source you lose the chance.
if the container turns out not to have the source (multi-stage build that only kept the compiled output), then unfortunately it's gone and ben's right.
Status changed to Solved 0x5b62656e5d • 26 days ago