forked from oppia/oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_dev.yaml
188 lines (183 loc) · 6.75 KB
/
app_dev.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
180
181
182
183
184
185
186
187
188
runtime: python39
instance_class: F2
# The "version" line is added here so that MR jobs can run locally (see issue
# #6534 on oppia/oppia).
version: default
# Timeout is set to 60 so that the gunicorn workers don't die while sending
# the Apache Beam jobs to Google Cloud Dataflow. Log level is set to 'warning'
# because the info logs are very noisy.
entrypoint: gunicorn --timeout 60 --log-level warning --bind :$PORT main:app
inbound_services:
- warmup
- mail
default_expiration: "10m"
handlers:
# PRODUCTION STATIC
- url: /sitemap.xml
static_files: assets/sitemap.xml
upload: assets/sitemap.xml
secure: always
- url: /build
static_dir: build
secure: always
expiration: "90d"
- url: /third_party/static
static_dir: third_party/static
secure: always
expiration: "90d"
- url: /.well-known/security.txt
static_files: assets/.well-known/security.txt
upload: assets/.well-known/security.txt
secure: always
# DEVELOPMENT STATIC
- url: /webpack_bundles
static_dir: webpack_bundles
secure: always
expiration: "0"
# /dist is the build output folder for angular.
- url: /dist
static_dir: dist/
secure: always
expiration: "0"
- url: /assets/audio
static_dir: assets/audio
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assets/i18n
static_dir: assets/i18n
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assets/overrides/guppy
static_dir: assets/overrides/guppy
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assets/pages
static_dir: assets/pages
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assets/scripts
static_dir: assets/scripts
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assets/svg_diagram_editor
static_dir: assets/svg_diagram_editor
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assets/images
static_dir: assets/images
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /assetsstatic
static_dir: assets
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
# Serve CSS files under core/templates.
# This regex allows us to recursively serve CSS files.
# "\1" inserts text captured by the capture group in the URL pattern.
- url: /templates/(.*\.(css))$
static_files: core/templates/\1
upload: core/templates/(.*\.(css))$
secure: always
expiration: "0"
- url: /templates/(.*\.(html))$
static_files: core/templates/\1
upload: core/templates/(.*\.(html))$
secure: always
expiration: "0"
- url: /third_party/generated
static_dir: third_party/generated
secure: always
http_headers:
# This is replaced by a specific origin when doing a deployment.
Access-Control-Allow-Origin: "*"
expiration: "0"
- url: /extensions/interactions/(.*)/static/(.*\.(css|png))
static_files: extensions/interactions/\1/static/\2
upload: extensions/interactions/(.*)/static/(.*\.(css|png))
secure: always
expiration: "0"
- url: /extensions/(interactions|rich_text_components)/(.*)/directives/(.*\.(html))
static_files: extensions/\1/\2/directives/\3
upload: extensions/(interactions|rich_text_components)/(.*)/directives/(.*\.(html))
secure: always
expiration: "0"
# Serve PNG images for interactions, rich_text_components, objects, classifiers,
# and custom ckeditor plugins under extensions in dev mode. This regex allows
# us to recursively serve PNG images scripts under the five specified
# directories. "\1" and "\2" insert capture groups from the url pattern.
- url: /extensions/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(png))$
static_files: extensions/\1/\2
upload: extensions/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(png))$
secure: always
expiration: "0"
- url: /extensions/ckeditor_plugins/(.*\.(js))$
static_files: extensions/ckeditor_plugins/\1
upload: extensions/ckeditor_plugins/(.*\.(js))$
secure: always
expiration: "0"
- url: /extensions/visualizations/(.*\.html)
static_files: extensions/visualizations/\1
upload: extensions/visualizations/(.*\.html)
secure: always
expiration: "0"
- url: /extensions/objects/templates/(.*\.html)
static_files: extensions/objects/templates/\1
upload: extensions/objects/templates/(.*\.html)
secure: always
expiration: "0"
# This is an access connector that connects to the Google Cloud Redis instance
# used for memory caching. Please replace PROJECT_ID with the correct project id
# for oppia on the production server.
vpc_access_connector:
name: projects/PROJECT_ID/locations/us-central1/connectors/oppia-redis-connector-1
env_variables:
PYTHONHTTPSVERIFY: 1
# GAE_USE_SOCKETS_HTTPLIB is needed for the redis connector in the Python 2
# runtime. More information can be found here:
# https://cloud.google.com/appengine/docs/standard/python/connecting-vpc#configuring
# (The second note under 'Configuring your app to use a connector') which
# redirects to these instructions to disable URL fetch:
# https://cloud.google.com/appengine/docs/standard/python/sockets#making_httplib_use_sockets
GAE_USE_SOCKETS_HTTPLIB: "anyvalue"
# FIREBASE_AUTH_EMULATOR_HOST is needed to allow the Firebase SDK to connect
# with the Firebase emulator. THIS MUST NOT BE DEPLOYED TO PRODUCTION. We
# protect against this in the build script.
FIREBASE_AUTH_EMULATOR_HOST: "localhost:9099"
# These environment variables allows Cloud NDB services to communicate with the
# Cloud Datastore Emulator. THESE MUST NOT BE DEPLOYED TO PRODUCTION! We strip
# them from the deployed app.yaml in scripts.build.
DATASTORE_DATASET: "dev-project-id"
DATASTORE_EMULATOR_HOST: "localhost:8089"
DATASTORE_EMULATOR_HOST_PATH: "localhost:8089/datastore"
DATASTORE_HOST: "http://localhost:8089"
DATASTORE_PROJECT_ID: "dev-project-id"
DATASTORE_USE_PROJECT_ID_AS_APP_ID: "true"
SECRETS: "{\"ANDROID_BUILD_SECRET\": \"android-build-secret\", \"VM_ID\": \"vm_default\", \"SHARED_SECRET_KEY\": \"1a2b3c4e\"}"
# These environment variables control GRPC logging verbosity. See
# https://stackoverflow.com/a/78803598.
GRPC_VERBOSITY: "ERROR"
GLOG_minloglevel: "2"