Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access to a file or folder on heroku server

Tags:

java

git

heroku

When I deploy my application on Heroku server, the server generate an app automatically and I found on my resource a git url. Example: [email protected]:myapp-ss-1338.git. How can I access this url to view source code or folder via a web browser?

like image 824
Tien Nguyen Avatar asked Apr 02 '13 05:04

Tien Nguyen


People also ask

How do I access my Heroku files?

The dashboard can be accessed via the CLI: $ heroku addons:open filepicker Opening filepicker for sharp-mountain-4005… or by visiting the Heroku Dashboard and selecting the application in question. Select Ink file picker from the Add-ons menu.

Can Heroku access local files?

Heroku has an “ephemeral” hard drive, this means that you can write files to disk, but those files will not persist after the application is restarted. By default Active Storage uses a :local storage option, which uses the local file system to store any uploaded files.

How do I access Heroku deployed files?

Terminal access is now provided by clicking a link "More" on the top right of the Heroku dashboard where you can select "run console". This presents an option to run terminal commands and shows a default of 'bash'. However, you do have to explicitly enter 'bash' or other command.

How do I upload a folder to Heroku?

How Does Simple File Upload Work? Simple File Upload replaces a hidden input tag that you create with an upload widget. When your user adds a file, it is uploaded to the cloud and a URL that links to that file is returned. Simple File Upload is specifically designed to work with Heroku's ephemeral filesystem.


2 Answers

heroku run bash is the best way to see what is actually deployed to dynos. As for the git repo you should treat it more like a way to deploy your app (and so therefore ephemeral) than a place to store your code.

There is no way to view what is in that repo from your web browser.

If you want to get at the files in the Heroku repo you can do so by doing a git clone [repo address].

like image 74
Eric Fode Avatar answered Sep 30 '22 19:09

Eric Fode


If necessary, you might be able to clone your app’s source from its Heroku Git repository using the heroku git:clone command:

$ heroku git:clone -a myapp

Replace myapp with the name of your app.

This command creates a copy of the Heroku-hosted repository that contains your app’s source and complete repository history. It also includes a heroku Git remote to simplify future pushes.

like image 2
Vraja Avatar answered Sep 28 '22 19:09

Vraja