This page shows you how to use
command to deploy your app. The
tool is included with the
App Engine Go SDK.
It also includes the
appcfg.py tool which is used
for some operations.
Before you begin
Using a proxy
If you'll be running
on a system which uses an HTTP(S) proxy, set environment variables so that the
tool can communicate via the proxy.
set HTTP_PROXY=http://cache.example.com:3128 set HTTPS_PROXY=http://cache.example.com:3128
Mac / Linux
export http_proxy="http://cache.example.com:3128" export https_proxy="http://cache.example.com:3128"
Deploying an app
After you deploy, your application runs at the URL
To upload your application files, run
goapp deploy from within the root
directory of your application.
The root directory must contain the
app.yaml file for the application.
Alternatively, you can provide the location of your application's root directory
as an additional argument. For more help using the tool, run
goapp help deploy.
The tool will automatically use the application ID from the
app.yaml file. However,
many of our sample applications omit
application: from the
so you will need to specify a Console project ID as the application ID when deploying them:
goapp deploy -application <YOUR_PROJECT_ID> myapp/
If your app is factored into more than one service, you can specify which services should be updated.
- If you are updating the default service, it must come first in the list.
- If you are uploading the app for the first time, the default service must be included.
cd myapp goapp deploy main/app.yaml mod1/mod1.yaml mod2/mod2.yaml
You will receive verification via the command line as each service is successfully deployed.
If your app's
defines an index that doesn't yet exist, App Engine will create it after you
upload your app. This process may take a while, and any query that requires
the index will raise an exception until the index is built.
To prevent this:
- Give the app a new version number in
- In the Cloud Platform Console, check the status of the app's indexes.
- Once the index has been built, manually update the default version in the Cloud Platform Console.
index.yamlconfiguration before uploading the app:
appcfg.py update_indexes myapp/
In the Cloud Platform Console, check the status of the app's indexes.
- Once the index has been built, upload your app.