Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | # Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is govered by a BSD-style |
| 3 | # license that can be found in the LICENSE file or at |
| 4 | # https://developers.google.com/open-source/licenses/bsd |
| 5 | |
| 6 | runtime: python27 |
| 7 | api_version: 1 |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 8 | threadsafe: yes |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 9 | |
| 10 | default_expiration: "10d" |
| 11 | |
| 12 | define(`_VERSION', `syscmd(`echo $_VERSION')') |
| 13 | |
| 14 | ifdef(`PROD', ` |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 15 | instance_class: F1 |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 16 | automatic_scaling: |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 17 | min_pending_latency: 15000ms |
| 18 | max_pending_latency: 15000ms |
| 19 | min_instances: 1 |
| 20 | max_instances: 1 |
| 21 | max_concurrent_requests: 80 |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 22 | ') |
| 23 | |
| 24 | ifdef(`STAGING', ` |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 25 | instance_class: F1 |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 26 | automatic_scaling: |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 27 | min_instances: 1 |
| 28 | max_instances: 1 |
| 29 | max_concurrent_requests: 50 |
| 30 | min_pending_latency: automatic |
| 31 | max_pending_latency: 15000ms |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 32 | ') |
| 33 | |
| 34 | ifdef(`DEV', ` |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 35 | instance_class: F1 |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 36 | automatic_scaling: |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 37 | min_instances: 1 |
| 38 | max_instances: 1 |
| 39 | max_concurrent_requests: 50 |
| 40 | min_pending_latency: automatic |
| 41 | max_pending_latency: 15000ms |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 42 | ') |
| 43 | |
| 44 | handlers: |
| 45 | - url: /_ah/api/.* |
| 46 | script: monorailapp.endpoints |
| 47 | |
| 48 | - url: /robots.txt |
| 49 | static_files: static/robots.txt |
| 50 | upload: static/robots.txt |
| 51 | expiration: "10m" |
| 52 | |
| 53 | - url: /database-maintenance |
| 54 | static_files: static/database-maintenance.html |
| 55 | upload: static/database-maintenance.html |
| 56 | |
| 57 | - url: /static/dist |
| 58 | static_dir: static/dist |
| 59 | mime_type: application/javascript |
| 60 | secure: always |
| 61 | http_headers: |
| 62 | Access-Control-Allow-Origin: '*' |
| 63 | |
| 64 | - url: /static/js |
| 65 | static_dir: static/js |
| 66 | mime_type: application/javascript |
| 67 | secure: always |
| 68 | http_headers: |
| 69 | Access-Control-Allow-Origin: '*' |
| 70 | |
| 71 | - url: /static |
| 72 | static_dir: static |
| 73 | |
| 74 | - url: /_ah/mail/.+ |
| 75 | script: monorailapp.app |
| 76 | login: admin |
| 77 | |
| 78 | - url: /_ah/warmup |
| 79 | script: monorailapp.app |
| 80 | login: admin |
| 81 | |
| 82 | - url: /.* |
| 83 | script: monorailapp.app |
| 84 | secure: always |
| 85 | |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame^] | 86 | # From api service: |
| 87 | - url: /prpc/.* |
| 88 | script: monorailapp.app |
| 89 | secure: always |
| 90 | |
| 91 | # From besearch service |
| 92 | - url: /_backend/.* |
| 93 | script: monorailapp.app |
| 94 | |
| 95 | # From latency-insensitive service |
| 96 | - url: /_task/.* |
| 97 | script: monorailapp.app |
| 98 | login: admin |
| 99 | |
| 100 | - url: /_cron/.* |
| 101 | script: monorailapp.app |
| 102 | login: admin |
| 103 | |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 104 | inbound_services: |
| 105 | - mail |
| 106 | - mail_bounce |
| 107 | ifdef(`PROD', ` |
| 108 | - warmup |
| 109 | ') |
| 110 | ifdef(`STAGING', ` |
| 111 | - warmup |
| 112 | ') |
| 113 | |
| 114 | libraries: |
| 115 | - name: endpoints |
| 116 | version: 1.0 |
| 117 | - name: grpcio |
| 118 | version: 1.0.0 |
| 119 | - name: MySQLdb |
| 120 | version: "latest" |
| 121 | - name: ssl # needed for google.auth.transport and GAE_USE_SOCKETS_HTTPLIB |
| 122 | version: "2.7.11" |
| 123 | |
| 124 | includes: |
| 125 | - gae_ts_mon |
| 126 | |
| 127 | env_variables: |
| 128 | VERSION_ID: '_VERSION' |
| 129 | GAE_USE_SOCKETS_HTTPLIB : '' |
| 130 | |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 131 | skip_files: |
| 132 | - ^(.*/)?#.*#$ |
| 133 | - ^(.*/)?.*~$ |
| 134 | - ^(.*/)?.*\.py[co]$ |
| 135 | - ^(.*/)?.*/RCS/.*$ |
| 136 | - ^(.*/)?\..*$ |
| 137 | - node_modules/ |
| 138 | - venv/ |