-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serve static pages from app.yaml #6974
Merged
Merged
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0bc53bb
create render template method
jameesjohn df266a2
address review comments
jameesjohn 8b63d34
Merge branch 'develop' of https://github.com/oppia/oppia into static-…
jameesjohn 9106197
address review comments
jameesjohn 6d2cdb9
fix error due to merge
jameesjohn 77fc41d
address review comments
jameesjohn e3f24b7
serve statics files from app.yaml
jameesjohn fff201a
address review comments
jameesjohn 9baa459
more on review comments and test issue
jameesjohn 3458a6b
Merge branch 'develop' of https://github.com/oppia/oppia into static-…
jameesjohn 6df30d8
add hases to files in app.yaml
jameesjohn a209b4e
Merge branch 'develop' of https://github.com/oppia/oppia into static-…
jameesjohn 7ccbf19
create dev app.yaml and prod app.yaml as well as write tests for the …
jameesjohn 04bd338
address review comments and revert package-lock.json
jameesjohn f27d23b
address review comments
jameesjohn c6617b5
revert change in constants
jameesjohn 81922b9
remove app.yaml
jameesjohn 9104bca
work on failing e2e tests
jameesjohn abddd81
fix lint issues
jameesjohn 33c6f79
revert package-lock.json
jameesjohn d99be7c
Merge branch 'develop' of https://github.com/oppia/oppia into static-…
jameesjohn bd7eca5
remove other variants of splash page
jameesjohn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,296 @@ | ||
runtime: python27 | ||
api_version: 1 | ||
threadsafe: false | ||
instance_class: F2 | ||
# The "version" line is added here so that MR jobs can run locally (see issue | ||
# #6534 on oppia/oppia). | ||
version: default | ||
|
||
builtins: | ||
- appstats: on | ||
- deferred: on | ||
- remote_api: on | ||
|
||
inbound_services: | ||
- warmup | ||
|
||
default_expiration: "10m" | ||
handlers: | ||
# PRODUCTION STATIC | ||
- url: /favicon.ico | ||
static_files: assets/favicon.ico | ||
upload: assets/favicon.ico | ||
secure: always | ||
- url: /robots.txt | ||
static_files: assets/robots.txt | ||
upload: assets/robots.txt | ||
secure: always | ||
- url: /sitemap.xml | ||
static_files: assets/sitemap.xml | ||
upload: assets/sitemap.xml | ||
secure: always | ||
- url: /mapreduce/pipeline/images | ||
static_dir: third_party/gae-mapreduce-1.9.22.0/mapreduce/lib/pipeline/ui/images | ||
secure: always | ||
- url: /build | ||
static_dir: build | ||
secure: always | ||
expiration: "90d" | ||
- url: /third_party/static | ||
static_dir: third_party/static | ||
secure: always | ||
expiration: "90d" | ||
|
||
# DEVELOPMENT STATIC | ||
- url: /dist | ||
static_dir: core/templates/dev/head/dist | ||
secure: always | ||
application_readable: true | ||
expiration: "0" | ||
- url: /assets | ||
static_dir: assets | ||
secure: always | ||
application_readable: true | ||
expiration: "0" | ||
# Serve js scripts and css files under core/templates/dev/head. | ||
# This regex allows us to recursively serve js scripts. | ||
# "\1" inserts text captured by the capture group in the URL pattern. | ||
- url: /templates/dev/head/(.*\.(css))$ | ||
static_files: core/templates/dev/head/\1 | ||
upload: core/templates/dev/head/(.*\.(css))$ | ||
secure: always | ||
expiration: "0" | ||
- url: /templates/dev/head/(.*\.(js))$ | ||
static_files: local_compiled_js/core/templates/dev/head/\1 | ||
upload: local_compiled_js/core/templates/dev/head/(.*\.(js))$ | ||
secure: always | ||
expiration: "0" | ||
- url: /templates/dev/head/(.*\.(html))$ | ||
static_files: core/templates/dev/head/\1 | ||
upload: core/templates/dev/head/(.*\.(html))$ | ||
secure: always | ||
expiration: "0" | ||
application_readable: true | ||
- url: /third_party/generated | ||
static_dir: third_party/generated | ||
secure: always | ||
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/(.*)/static/(.js) | ||
static_files: extensions/interactions/\1/static/\2 | ||
upload: local_compiled_js/extensions/interactions/(.*)/static/(.js) | ||
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 js scripts for gadgets, interactions, rich_text_components, custom ckeditor plugins | ||
# and objects under extensions in dev mode. This regex allows us to recursively serve js | ||
# scripts under the three 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/(interactions|rich_text_components|objects|classifiers|ckeditor_plugins)/(.*\.(js))$ | ||
static_files: local_compiled_js/extensions/\1/\2 | ||
upload: local_compiled_js/extensions/(interactions|rich_text_components|objects|classifiers|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" | ||
|
||
# DYNAMIC | ||
- url: /mapreduce(/.*)? | ||
script: mapreduce.main.APP | ||
login: admin | ||
secure: always | ||
- url: /mapreduce/worker(/.*)? | ||
script: mapreduce.main.APP | ||
login: admin | ||
secure: always | ||
- url: /cron/.* | ||
login: admin | ||
script: main_cron.app | ||
secure: always | ||
- url: /task/.* | ||
login: admin | ||
script: main_taskqueue.app | ||
secure: always | ||
- url: /_ah/mail/.* | ||
login: admin | ||
script: main_mail.app | ||
secure: always | ||
|
||
# STATIC PAGES. | ||
- url: /get_started | ||
static_files: core/templates/dev/head/dist/get-started-page.mainpage.html | ||
upload: core/templates/dev/head/dist/get-started-page.mainpage.html | ||
http_headers: | ||
Pragma: no-cache | ||
Strict-Transport-Security: 'max-age=31536000; includeSubDomains' | ||
X-Content-Type-Options: nosniff | ||
X-Frame-Options: DENY | ||
X-Xss-Protection: '1; mode=block' | ||
secure: always | ||
expiration: "0" | ||
- url: /splash | ||
static_files: core/templates/dev/head/dist/splash-page.mainpage.html | ||
upload: core/templates/dev/head/dist/splash-page.mainpage.html | ||
http_headers: | ||
Pragma: no-cache | ||
Strict-Transport-Security: 'max-age=31536000; includeSubDomains' | ||
X-Content-Type-Options: nosniff | ||
X-Frame-Options: DENY | ||
X-Xss-Protection: '1; mode=block' | ||
secure: always | ||
expiration: "0" | ||
- url: /splash?c=at0 | ||
static_files: core/templates/dev/head/dist/splash_at0.html | ||
upload: core/templates/dev/head/dist/splash_at0.html | ||
http_headers: | ||
Pragma: no-cache | ||
Strict-Transport-Security: 'max-age=31536000; includeSubDomains' | ||
X-Content-Type-Options: nosniff | ||
X-Frame-Options: DENY | ||
X-Xss-Protection: '1; mode=block' | ||
secure: always | ||
expiration: "0" | ||
- url: /splash?c=at1 | ||
static_files: core/templates/dev/head/dist/splash_at1.html | ||
upload: core/templates/dev/head/dist/splash_at1.html | ||
http_headers: | ||
Pragma: no-cache | ||
Strict-Transport-Security: 'max-age=31536000; includeSubDomains' | ||
X-Content-Type-Options: nosniff | ||
X-Frame-Options: DENY | ||
X-Xss-Protection: '1; mode=block' | ||
secure: always | ||
expiration: "0" | ||
- url: /teach | ||
static_files: core/templates/dev/head/dist/teach-page.mainpage.html | ||
upload: core/templates/dev/head/dist/teach-page.mainpage.html | ||
http_headers: | ||
Pragma: no-cache | ||
Strict-Transport-Security: 'max-age=31536000; includeSubDomains' | ||
X-Content-Type-Options: nosniff | ||
X-Frame-Options: DENY | ||
X-Xss-Protection: '1; mode=block' | ||
secure: always | ||
expiration: "0" | ||
|
||
- url: /.* | ||
script: main.app | ||
secure: always | ||
|
||
libraries: | ||
- name: jinja2 | ||
version: '2.6' | ||
- name: PIL | ||
version: '1.1.7' | ||
# This is needed for sending requests to a mailgun HTTPS URL. | ||
- name: ssl | ||
version: '2.7.11' | ||
- name: webapp2 | ||
version: '2.5.2' | ||
|
||
env_variables: | ||
PYTHONHTTPSVERIFY: 1 | ||
|
||
skip_files: | ||
# .pyc and .pyo files | ||
- ^(.*/)?.*\.py[co]$ | ||
# Unix hidden files whose names begin with a dot | ||
- ^(.*/)?\..*$ | ||
# Karma test files | ||
- ^(.*/)Spec.js$ | ||
# Typescript files | ||
- ^(.*/)?.*\.ts$ | ||
# Typescript output log file | ||
- ^(.*/)tsc_output_log.txt$ | ||
# Other folders to ignore | ||
- tests/ | ||
- scripts/ | ||
- integrations/ | ||
- integrations_dev/ | ||
- node_modules/ | ||
# Some third_party static scripts are directly imported, namely: jquery, | ||
# jqueryui, angularjs, jqueryui-touch-punch, MathJax, code-mirror, | ||
# ui-codemirror, d3js, midi-js, ui-map, guppy, skulpt, math-expressions. | ||
# We exclude some of the scripts that are not directly imported in order to | ||
# reduce deployed file count. | ||
# TODO(sll): Find a more structured way of doing this. | ||
- third_party/static/angular-audio-1.7.4 | ||
- third_party/static/angular-scroll-1.0.0 | ||
- third_party/static/angular-toastr-1.7.0 | ||
- third_party/static/bower-material-0.6.0-rc1 | ||
- third_party/static/fontawesome-free-5.8.1-web | ||
- third_party/static/guppy-b5055b/site | ||
- third_party/static/guppy-b5055b/test | ||
- third_party/static/MathJax-2.7.5/docs | ||
- third_party/static/MathJax-2.7.5/fonts | ||
- third_party/static/MathJax-2.7.5/localization/ast | ||
- third_party/static/MathJax-2.7.5/localization/bcc | ||
- third_party/static/MathJax-2.7.5/localization/bg | ||
- third_party/static/MathJax-2.7.5/localization/br | ||
- third_party/static/MathJax-2.7.5/localization/ca | ||
- third_party/static/MathJax-2.7.5/localization/cdo | ||
- third_party/static/MathJax-2.7.5/localization/cs | ||
- third_party/static/MathJax-2.7.5/localization/cy | ||
- third_party/static/MathJax-2.7.5/localization/da | ||
- third_party/static/MathJax-2.7.5/localization/de | ||
- third_party/static/MathJax-2.7.5/localization/eo | ||
- third_party/static/MathJax-2.7.5/localization/es | ||
- third_party/static/MathJax-2.7.5/localization/fa | ||
- third_party/static/MathJax-2.7.5/localization/fi | ||
- third_party/static/MathJax-2.7.5/localization/fr | ||
- third_party/static/MathJax-2.7.5/localization/gl | ||
- third_party/static/MathJax-2.7.5/localization/he | ||
- third_party/static/MathJax-2.7.5/localization/ia | ||
- third_party/static/MathJax-2.7.5/localization/it | ||
- third_party/static/MathJax-2.7.5/localization/ja | ||
- third_party/static/MathJax-2.7.5/localization/kn | ||
- third_party/static/MathJax-2.7.5/localization/ko | ||
- third_party/static/MathJax-2.7.5/localization/lb | ||
- third_party/static/MathJax-2.7.5/localization/lki | ||
- third_party/static/MathJax-2.7.5/localization/lt | ||
- third_party/static/MathJax-2.7.5/localization/mk | ||
- third_party/static/MathJax-2.7.5/localization/nl | ||
- third_party/static/MathJax-2.7.5/localization/oc | ||
- third_party/static/MathJax-2.7.5/localization/pl | ||
- third_party/static/MathJax-2.7.5/localization/pt | ||
- third_party/static/MathJax-2.7.5/localization/pt-br | ||
- third_party/static/MathJax-2.7.5/localization/qqq | ||
- third_party/static/MathJax-2.7.5/localization/ru | ||
- third_party/static/MathJax-2.7.5/localization/scn | ||
- third_party/static/MathJax-2.7.5/localization/sco | ||
- third_party/static/MathJax-2.7.5/localization/sl | ||
- third_party/static/MathJax-2.7.5/localization/sv | ||
- third_party/static/MathJax-2.7.5/localization/tr | ||
- third_party/static/MathJax-2.7.5/localization/uk | ||
- third_party/static/MathJax-2.7.5/localization/vi | ||
- third_party/static/MathJax-2.7.5/localization/zh-hans | ||
- third_party/static/MathJax-2.7.5/test | ||
- third_party/static/MathJax-2.7.5/unpacked | ||
- third_party/static/messageformat-2.0.5 | ||
- third_party/static/ng-img-crop-0.3.2 | ||
- third_party/static/nginfinitescroll-1.0.0 | ||
- third_party/static/perfectscrollbar-0.6.16 | ||
- third_party/static/rangy-1.3.0 | ||
- third_party/static/widget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per our discussion, let's just have one app.yaml file in the codebase so that there's a single source of truth.
@vojtechjelinek FYI we discussed having a template file from which to generate dev/prod, but then we figured that it would be better to just have the "dev" version in the codebase (as we do now) and then do the changes needed to transform it to the "prod" version (like we do with other files/folders). This means that we only have one indirectly-generated file rather than two (which is better, since indirect pipelines like this often lead to errors).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seanlip, should this file still be in the codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so.