[英]Google App Engine - Could not find dispatch configuration
我想為GAE(PHP運行時)創建非常標准的設置:2個具有特定URL(路由)的模塊:
我已經創建了4個.yaml配置文件:
的app.yaml
application: ABC
version: 1
runtime: php55
api_version: 1
threadsafe: yes
automatic_scaling:
max_idle_instances: 20
handlers:
- url: /.*
script: api/web/index.php
dispatch.yaml
application: ABC
dispatch:
- url: "*/app/*"
module: web-based
- url: "*/*"
module: default
web_based.yaml
application: ABC
module: web-based
version: 1
runtime: php55
api_version: 1
threadsafe: yes
automatic_scaling:
min_idle_instances: 2
max_pending_latency: 1s
handlers:
- url: /(.*\.(gif|png|jpg|css|js|otf))
static_files: /\1
upload: /(.*\.(gif|png|jpg|js|css|otf))
api.yaml
application: ABC
module: default
version: 1
runtime: php55
api_version: 1
threadsafe: yes
manual_scaling:
instances: 1
handlers:
- url: /(.*\.(gif|png|jpg|css|js|otf))
static_files: web/\1
upload: web/(.*\.(gif|png|jpg|js|css|otf))
- url: /assets/(.+)
static_files: web/assets/\1
upload: web/assets/(.+)
- url: /.*
script: web/index.php
目錄結構:
- api/api.yaml
- app/web_base.yaml
- app.yaml
- dispatch
當我嘗試update_dispatch時,我找不到調度配置文件。 有人能幫我嗎?
在多模塊應用程序中,不再有應用程序級別的app.yaml
,每個模塊只有一個.yaml
文件,僅此而已。
因此,擺脫頂級app.yaml
(如果需要,將其相關內容合並到api.yaml
文件中,這是您的default
模塊之一)。 這兩個文件沖突,可能會使update_dispatch操作混亂。 然后部署默認模塊-通常需要先部署它,然后才能部署應用程序級配置(例如dispatch.yaml
文件)和其他模塊。
就文件夾結構而言,Google App Engine應用程序中的默認服務/模塊是否可以成為非默認服務的同級產品? ,它適用於python應用程序,但其中的許多內容(例如應用程序目錄結構,應用程序級配置(例如調度)和部署)也適用於php。
旁注:
web_based.yaml
的動態處理程序。 default
模塊-這就是沒有路由請求被分派到反正
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.