简体   繁体   English

我在哪里可以找到 Google App Engine 柔性环境的源代码?

[英]Where will I find the source code for Google App Engine Flexible environment?

I want to download the source code in my Python 3 App Engine flexible environment.我想在我的 Python 3 App Engine 柔性环境中下载源代码。 I see how you can SSH in, or go in from the terminal, to look at source code.我了解您如何通过 SSH 登录或从终端进入以查看源代码。 But I don't want to turn debug on a production machine.但我不想在生产机器上打开调试。 Instead, is it possible to just list the files, and then download to my machine?相反,是否可以只列出文件,然后下载到我的机器上?

The app was uploaded using Docker, pushed to gcr.io, and deployed with gcloud app deploy .该应用程序使用 Docker 上传,推送到 gcr.io,并使用gcloud app deploy进行部署。

I managed to copy the source code from the App Engine Flex environment by following these steps:我通过以下步骤设法从 App Engine Flex 环境中复制了源代码:

  1. Fetch the App Engine image to be used by performing either the following:通过执行以下任一操作来获取要使用的 App Engine 映像:

    • Navigate to Google Container Registry then select appengine导航到Google Container Registry ,然后选择appengine
    • Typing gcloud container images list --repository [region]/[project-name]/appengine in Cloud Shell在 Cloud Shell 中输入gcloud container images list --repository [region]/[project-name]/appengine

    Supported regions:支持地区:

    • gcr.io
    • us.gcr.io
    • eu.gcr.io
    • asia.gcr.io
  2. Create a container using Docker:使用 Docker 创建容器:

    docker create --name=gae-source [region]/[project-name]/appengine/[service].[version]:[tag]

    It would be easier to copy the full repository name then add the tags afterwards by clicking the copy复制完整的存储库名称然后通过单击复制添加tags会更容易2button beside the repository name or service.version .存储库名称或service.version旁边的按钮。

  3. Copy the files from the docker container:从 docker 容器中复制文件:

    docker cp gae-source:/app . --follow-link

  4. Check if the files are successfully copied:检查文件是否复制成功:

    ls ./app

  5. Compress the files by performing:通过执行压缩文件:

    tar -czvf app.tar.gz ./[folder]

  6. You may now download the compressed file on your local machine.您现在可以在本地计算机上下载压缩文件。

I managed to view the source code by using the Cloud Shell Editor.我设法使用 Cloud Shell Editor 查看了源代码。 I didn't have to download the files.我不必下载文件。

You can check this Github link that I followed.你可以查看我关注的这个Github 链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine灵活 - 环境变量 - Google App Engine Flexible - environment variables Google App Engine标准版或灵活环境? - Google App Engine Standard or Flexible environment? 在Google App Engine灵活环境中启用CORS - Enabling CORS in Google App Engine Flexible Environment google app engine源码根在哪里 - Where is the google app engine source code root 将Google App Engine应用程序升级到灵活环境时,如何运行Google的aefix工具? - How do I run Google's aefix tool when upgrading a Google App Engine app to the flexible environment? 如何在Google App Engine(灵活的环境)上为应用创建开发服务器? - How can I create a development server for an app on Google App Engine (Flexible environment)? 在灵活的环境中将Google App Engine与Google Cloud Storage相连接 - Connect Google App Engine with Google Cloud Storage in flexible environment 如何在Google App Engine PHP灵活环境中为GD启用FreeType支持? - How do I enable FreeType support for GD in Google App Engine PHP flexible environment? 如何在Google App Engine灵活环境中编辑NGINX配置? - How can I edit the NGINX configuration on Google App Engine flexible environment? 我无法连接到Google App Engine灵活环境实例。 Node.js - I can't connect to the Google app engine flexible environment instance. Node.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM