14

I'm pretty new to the Google Cloud Platform. I have deployed a Python 3 Flask app in AppEngine Flexible Environment using the Google Cloud SDK and the app works fine. I just want to view the source files deployed, in the cloud. Is there any way to view my project files in GCP?

Ajay Sivan
  • 2,807
  • 2
  • 32
  • 57
  • This may help: https://stackoverflow.com/questions/49181876/downloading-app-engine-source-code – Dan Cornilescu Jun 19 '18 at 03:06
  • @DanCornilescu I have the source code, but I just want to view the files in cloud using the GCP console/terminal. Is that possible? – Ajay Sivan Jun 19 '18 at 03:16
  • Not directly, as the cloud console doesn't run on the same instance, but you can connect to the instance: https://cloud.google.com/appengine/docs/flexible/python/debugging-an-instance#connecting_to_the_instance – Dan Cornilescu Jun 19 '18 at 11:54

1 Answers1

19

You can view the source files by clicking on tools > debug next to the app version on your versions page

Alternative, you can go to your instances page, click on SSH next to one of the instances and you will enter the debug mode for that specific instance.

This will open a console in your browser and you can start a shell in the container that is running your app, as described here.

PS: apparently this is possible only for the Flexible Environment

saccodd
  • 972
  • 9
  • 23
  • 3
    I use appengine standard and I can acces the compiled files in versions > tools > debug – Kelvijn Aug 30 '19 at 08:33
  • So in other words, there are certain files which cannot be accessed via the GCP GUI but can only be accessed/viewed through the cloud shell, and the steps you've outlined do that, right? – jbuddy_13 Mar 11 '21 at 16:30
  • 1
    none of this is working for me. the `deployed files` list is empty showing `source not available` and the debugger says it could not find a target for `default - prod` and to make sure it's up and serving requests (it is) – fIwJlxSzApHEZIl Nov 11 '21 at 20:46