-
Notifications
You must be signed in to change notification settings - Fork 16
/
app-explo-live.yaml
167 lines (144 loc) · 4.49 KB
/
app-explo-live.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#
# App.yaml for the Explo application on Google App Engine
#
# Copyright (C) 2023 by Miðeind ehf.
# Original author: Vilhjálmur Þorsteinsson
#
# Deploy with 'gcloud beta app deploy --no-promote --project=explo-live --version=somename app-explo.yaml'
#
runtime: python311
entrypoint: gunicorn -b :$PORT -w 4 --threads 2 --pythonpath './src' src.main:app
instance_class: B4_1G
manual_scaling:
instances: 2
vpc_access_connector:
name: 'projects/explo-live/locations/europe-west1/connectors/vpc0c'
env_variables:
# When running on the local development server,
# REDISHOST is automatically set to 'localhost' (in cache.py)
REDISHOST: 10.81.155.67
REDISPORT: 6379
PROJECT_ID: explo-live
# Single page UI
SINGLE_PAGE: TRUE
inbound_services:
- warmup
handlers:
# Robots.txt URL, cacheable
- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt
expiration: "1d 0h"
# Favorite icon URL, cacheable
- url: /favicon.ico
static_files: static/favicon.ico
upload: static/favicon.ico
expiration: "1d 0h"
# Favorite icon URL, 32x32
- url: /favicon-32x32.png
static_files: static/favicon-32x32.png
upload: static/favicon-32x32.png
expiration: "1d 0h"
# Favorite icon URL, 16x16
- url: /favicon-16x16.png
static_files: static/favicon-16x16.png
upload: static/favicon-16x16.png
expiration: "1d 0h"
# Service worker
- url: /service-worker.js
static_files: static/service-worker.js
upload: static/service-worker.js
mime_type: application/javascript
#expiration: "1d 0h"
# Internet Explorer & Windows 8 resource file, can be cached
- url: /browserconfig.xml
static_files: static/browserconfig.xml
upload: static/browserconfig.xml
expiration: "1d 0h"
# Microsoft Windows tile
- url: /mstile-150x150.png
static_files: static/mstile-150x150.png
upload: static/mstile-150x150.png
expiration: "1d 0h"
# Web manifest
- url: /explo.webmanifest
static_files: static/explo.webmanifest
upload: static/explo.webmanifest
expiration: "1d 0h"
# Safari pinned tab
- url: /safari-pinned-tab.svg
static_files: static/safari-pinned-tab.svg
upload: static/safari-pinned-tab.svg
expiration: "1d 0h"
# Special Apple iOS URLs for image resources, all cacheable
- url: /apple-touch-icon.png
static_files: static/touch-icon-ipad-retina.png
upload: static/touch-icon-ipad-retina.png
expiration: "1d 0h"
- url: /touch-icon-ipad.png
static_files: static/touch-icon-ipad.png
upload: static/touch-icon-ipad.png
expiration: "1d 0h"
- url: /touch-icon-ipad-retina.png
static_files: static/touch-icon-ipad-retina.png
upload: static/touch-icon-ipad-retina.png
expiration: "1d 0h"
- url: /touch-icon-iphone-retina.png
static_files: static/touch-icon-iphone-retina.png
upload: static/touch-icon-iphone-retina.png
expiration: "1d 0h"
# Image files that can be cached
- url: /static/(.*\.(gif|png|jpg|svg))(\?.*)?$
static_files: static/\1
upload: static/.*\.(gif|png|jpg|svg)$
expiration: "1d 0h"
# CSS files that can be cached
- url: /static/(.*\.css)(\?.*)?$
static_files: static/\1
upload: static/.*\.css$
mime_type: text/css
expiration: "0d 1h" # Was "1d 0h"
# Catchall for JavaScript
- url: /static/(.*\.min\.js)(\?.*)?$
static_files: static/\1
upload: static/.*\.min\.js$
mime_type: application/javascript
expiration: "0d 1h" # Was "1d 0h"
# Catchall for JavaScript
- url: /static/built/(.*\.min\.js)(\?.*)?$
static_files: static/built/\1
upload: static/built/.*\.min\.js$
mime_type: application/javascript
expiration: "0d 1h" # Was "1d 0h"
# Font files that can be cached
- url: /static/glyphicons-regular.ttf
static_files: static/glyphicons-regular.ttf
upload: static/glyphicons-regular.ttf
expiration: "1d 0h"
mime_type: application/font-sfnt
- url: /static/glyphicons-regular.eot
static_files: static/glyphicons-regular.eot
upload: static/glyphicons-regular.eot
expiration: "1d 0h"
mime_type: application/vnd.ms-fontobject
- url: /static/glyphicons-regular.svg
static_files: static/glyphicons-regular.svg
upload: static/glyphicons-regular.svg
expiration: "1d 0h"
mime_type: image/svg+xml
- url: /static/glyphicons-regular.woff
static_files: static/glyphicons-regular.woff
upload: static/glyphicons-regular.woff
expiration: "1d 0h"
mime_type: application/font-woff
# MP3 sound files that can be cached
- url: /static/(.*\.mp3)$
static_files: static/\1
upload: static/.*\.mp3$
mime_type: audio/mpeg
expiration: "1d 0h"
# Catchall for all other URLS
- url: .*
secure: always
redirect_http_response_code: 301
script: auto