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 |
| 8 | threadsafe: no |
| 9 | |
| 10 | default_expiration: "10d" |
| 11 | |
| 12 | define(`_VERSION', `syscmd(`echo $_VERSION')') |
| 13 | |
| 14 | ifdef(`PROD', ` |
| 15 | instance_class: F4 |
| 16 | automatic_scaling: |
| 17 | min_idle_instances: 25 |
| 18 | max_pending_latency: 0.2s |
| 19 | ') |
| 20 | |
| 21 | ifdef(`STAGING', ` |
| 22 | instance_class: F4 |
| 23 | automatic_scaling: |
| 24 | min_idle_instances: 1 |
| 25 | max_pending_latency: 0.2s |
| 26 | ') |
| 27 | |
| 28 | ifdef(`DEV', ` |
| 29 | instance_class: F4 |
| 30 | automatic_scaling: |
| 31 | min_idle_instances: 1 |
| 32 | ') |
| 33 | |
| 34 | handlers: |
| 35 | - url: /_ah/api/.* |
| 36 | script: monorailapp.endpoints |
| 37 | |
| 38 | - url: /robots.txt |
| 39 | static_files: static/robots.txt |
| 40 | upload: static/robots.txt |
| 41 | expiration: "10m" |
| 42 | |
| 43 | - url: /database-maintenance |
| 44 | static_files: static/database-maintenance.html |
| 45 | upload: static/database-maintenance.html |
| 46 | |
| 47 | - url: /static/dist |
| 48 | static_dir: static/dist |
| 49 | mime_type: application/javascript |
| 50 | secure: always |
| 51 | http_headers: |
| 52 | Access-Control-Allow-Origin: '*' |
| 53 | |
| 54 | - url: /static/js |
| 55 | static_dir: static/js |
| 56 | mime_type: application/javascript |
| 57 | secure: always |
| 58 | http_headers: |
| 59 | Access-Control-Allow-Origin: '*' |
| 60 | |
| 61 | - url: /static |
| 62 | static_dir: static |
| 63 | |
| 64 | - url: /_ah/mail/.+ |
| 65 | script: monorailapp.app |
| 66 | login: admin |
| 67 | |
| 68 | - url: /_ah/warmup |
| 69 | script: monorailapp.app |
| 70 | login: admin |
| 71 | |
| 72 | - url: /.* |
| 73 | script: monorailapp.app |
| 74 | secure: always |
| 75 | |
| 76 | inbound_services: |
| 77 | - mail |
| 78 | - mail_bounce |
| 79 | ifdef(`PROD', ` |
| 80 | - warmup |
| 81 | ') |
| 82 | ifdef(`STAGING', ` |
| 83 | - warmup |
| 84 | ') |
| 85 | |
| 86 | libraries: |
| 87 | - name: endpoints |
| 88 | version: 1.0 |
| 89 | - name: grpcio |
| 90 | version: 1.0.0 |
| 91 | - name: MySQLdb |
| 92 | version: "latest" |
| 93 | - name: ssl # needed for google.auth.transport and GAE_USE_SOCKETS_HTTPLIB |
| 94 | version: "2.7.11" |
| 95 | |
| 96 | includes: |
| 97 | - gae_ts_mon |
| 98 | |
| 99 | env_variables: |
| 100 | VERSION_ID: '_VERSION' |
| 101 | GAE_USE_SOCKETS_HTTPLIB : '' |
| 102 | |
| 103 | vpc_access_connector: |
| 104 | ifdef(`DEV',` |
| 105 | name: "projects/monorail-dev/locations/us-central1/connectors/redis-connector" |
| 106 | ') |
| 107 | ifdef(`STAGING',` |
| 108 | name: "projects/monorail-staging/locations/us-central1/connectors/redis-connector" |
| 109 | ') |
| 110 | ifdef(`PROD', ` |
| 111 | name: "projects/monorail-prod/locations/us-central1/connectors/redis-connector" |
| 112 | ') |
| 113 | |
| 114 | skip_files: |
| 115 | - ^(.*/)?#.*#$ |
| 116 | - ^(.*/)?.*~$ |
| 117 | - ^(.*/)?.*\.py[co]$ |
| 118 | - ^(.*/)?.*/RCS/.*$ |
| 119 | - ^(.*/)?\..*$ |
| 120 | - node_modules/ |
| 121 | - venv/ |