英文:
Difference between 'goapp deploy' and 'appcf.py' to deploy my app on Google App Engine?
问题
我不理解以下两个命令的区别:
goapp deploy -application <YOUR_PROJECT_ID> myapp/
和
appcfg.py -A <YOUR_PROJECT_ID_> -V v1 update myapp/
这两个命令在尝试在Google App Engine上部署我的应用程序时有何区别?能有人给我解释一下吗?
英文:
I don't understand the difference between
goapp deploy -application <YOUR_PROJECT_ID> myapp/
and
appcfg.py -A <YOUR_PROJECT_ID_> -V v1 update myapp/
when trying to deploy my app in google app engine. Can somebody enlighten me please?
答案1
得分: 3
在上传、下载和管理Go应用程序中有详细说明:
> goapp deploy
包装了SDK中提供的appcfg.py
Python工具。如果需要更多对部署的控制,也可以直接调用该工具。
goapp deploy
等同于 appcfg.py update myapp/
。
这些命令会自动从 app.yaml
中获取应用程序ID和其他配置信息。你可以使用 goapp
的 -application
参数,或者 appcfg.py
的 -A
参数来覆盖应用程序ID。
所以 goapp deploy
在底层调用了 appcfg.py
,它是一个方便隐藏 appcfg.py
的方法。
goapp deploy -application <YOUR_PROJECT_ID> myapp/
部署位于 myapp
文件夹中的应用程序。配置将从 myapp/app.yaml
文件中读取。该命令还会覆盖应用程序ID(如果在 app.yaml
中存在),并使用 <YOUR_PROJECT_ID>
。
appcfg.py -A <YOUR_PROJECT_ID> -V v1 update myapp/
这也会部署应用程序,但 -V
会覆盖 myapp/app.yaml
中可能存在的版本,并使用版本 v1
。-A
用于覆盖 app.yaml
中的ID,在这种情况下将使用 <YOUR_PROJECT_ID>
。
英文:
Documented in Uploading, Downloading, and Managing a Go App:
> goapp deploy
wraps the appcfg.py
python tool provided in the SDK. You can also invoke this tool directly if you need greater control over the deployment.
goapp deploy
is equivalent to appcfg.py update myapp/
.
These commands get application ID and other configuration from app.yaml
automatically. You can use -application
param of goapp
, or -A
of appcfg.py
to override the application ID.
So goapp deploy
calls appcfg.py
under the hood, it is a convenient method to hide appcfg.py
.
goapp deploy -application <YOUR_PROJECT_ID> myapp/
Deploys the application located in the myapp
folder. Configuration will be read from the app.yaml
file that must be at myapp/app.yaml
. The command also overrides the application ID (if present in app.yaml
), and <YOUR_PROJECT_ID>
will be used instead.
appcfg.py -A <YOUR_PROJECT_ID> -V v1 update myapp/
This also deploys the application, but the -V
overrides the version that may be present in myapp/app.yaml
, and will use the version v1
. -A
is used to override the ID from app.yaml
, will be <YOUR_PROJECT_ID>
in this case.
答案2
得分: 1
goapp
是一个通用工具,用于整个Go-on-App-Engine工作流程,从构建到部署;您可以使用相同的工具来安装依赖项(get
),构建您的应用程序,本地运行(serve
),然后部署它(以及运行测试、格式化代码等)。
其中一些工具包装了其他工具:goapp fmt
可能只是包装了gofmt
,而goapp deploy
只是包装了appcfg.py update
(请参阅文档)。
英文:
goapp
is a general tool for the whole Go-on-App-Engine workflow from build to deployment; you can use the same tool to install dependences (get
), build
your app, run locally (serve
) and then deploy
it (as well as run tests, format code, etc).
Some of these wrap other tools: goapp fmt
probably just wraps gofmt
, whilst goapp deploy
just wraps appcfg.py update
(see docs)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论