-
Notifications
You must be signed in to change notification settings - Fork 16
/
app-netskrafl.yaml
179 lines (154 loc) · 4.85 KB
/
app-netskrafl.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
168
169
170
171
172
173
174
175
176
177
178
179
#
# App.yaml for the Netskrafl 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 --version=somename app-netskrafl.yaml'
#
runtime: python38
entrypoint: gunicorn -b :$PORT -w 8 netskrafl:app
instance_class: B4
manual_scaling:
instances: 2
vpc_access_connector:
name: projects/netskrafl/locations/us-central1/connectors/vpc0c
env_variables:
# When running on the local development server,
# REDISHOST is automatically set to 'localhost' (in cache.py)
REDISHOST: 10.128.0.3
REDISPORT: 6379
PROJECT_ID: netskrafl
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: /netskrafl.webmanifest
static_files: static/netskrafl.webmanifest
upload: static/netskrafl.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))(\?.*)?$
static_files: static/\1
upload: static/.*\.(gif|png|jpg)$
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 minified 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 TypeScript source files (included for debugging only)
- url: /static/src/(.*\.[jt]s)(\?.*)?$
static_files: static/src/\1
upload: static/src/.*\.[jt]s$
mime_type: application/javascript
expiration: "30s"
# Un-minified JavaScript (included for debugging only)
- url: /static/built/explo\.js$
static_files: static/built/explo.js
upload: static/built/explo\.js$
mime_type: application/javascript
expiration: "30s"
# Source map (included for debugging only)
- url: /static/built/explo\.js\.map$
static_files: static/built/explo.js.map
upload: static/built/explo\.js\.map$
mime_type: application/javascript
expiration: "30s"
# 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