简体   繁体   中英

How do I deploy my GAE project for only a specific folder?

I wonder how do I deploy my Google App Engine project only for a specific folder?

eg If my project source folder is "src", and inside this src folder have many sub folders. Say, I have css, app, images, and js folders, but I want to deploy only css, app and images folders to the GAE, I want GAE to ignore js folder during the deployment, is there any way to do so with some setting in app.yaml file?

Thanks!

Joel

Have a look at skip_files

Skipping Files

Files in your application directory whose paths match a static_dir path or a static_files upload path are considered to be static files. All other files in the application directory are considered to be application program and data files.

The skip_files element specifies which files in the application directory are not to be uploaded to App Engine. The value is either a regular expression, or a list of regular expressions. Any filename that matches any of the regular expression is omitted from the list of files to upload when the application is uploaded.

You can now add a .gcloudignore file to the root of your project ( https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore ). The syntax is the same as .gitignore files.

For the OPs case, placing the following in the root folder (next to app.yaml ) should do the trick:

# .gcloudignore

src/js/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM