This repository was archived by the owner on Jan 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44__pycache__
55.cache
66tests
7+ develop
8+ .tox
Original file line number Diff line number Diff line change @@ -48,8 +48,4 @@ This will build the base image and then deploy the application. Once it's done d
4848
4949## Developing
5050
51- When developing, it's best to use the ` tests-e2e ` app as a guide:
52-
53- * Build a custom version of the base image.
54- * Write an app with a custom dockerfile that extends from your custom base image.
55- * Deploy the app.
51+ When developing, refer to the developing app under [ ` /develop ` ] ( develop ) .
Original file line number Diff line number Diff line change 1+ * .pyc
2+ __pycache__
3+ .cache
Original file line number Diff line number Diff line change 1+ Dockerfile
Original file line number Diff line number Diff line change 1+ FROM $DOCKER_IMAGE_NAME
2+
3+ ADD . /app/
4+ RUN pip install -r /app/requirements.txt
Original file line number Diff line number Diff line change 1+ include ../common.mk
2+
3+ .PHONY : all
4+ all : deploy
5+
6+ .PHONY : deploy
7+ deploy : build-base generate-dockerfile
8+ gcloud preview app deploy -q
9+
10+ .PHONY : build-base
11+ build-base :
12+ $(MAKE ) -C .. push
13+
14+ .PHONY : generate-dockerfile
15+ generate-dockerfile :
16+ sed " s#\$ $DOCKER_IMAGE_NAME #$( DOCKER_IMAGE_NAME) #g" Dockerfile.in > Dockerfile
Original file line number Diff line number Diff line change 1+ # Development App
2+
3+ This is a barebones app to use when developing changes to the core runtime components, such as the base docker image and vmruntime library.
4+
5+ This works by:
6+
7+ 1 . Building a custom version of the base image and pushing it to gcr.io.
8+ 2 . Building the app's image using the custom base image.
9+
10+ This allows you to replicate the end-to-end image building process while developing. The end-to-end test app uses the same build method.
11+
12+ ## Usage
13+
14+ Just use ` make all ` .
Original file line number Diff line number Diff line change 1+ runtime : custom
2+ vm : true
3+
4+ handlers :
5+ - url : .*
6+ script : main.app
7+
8+ manual_scaling :
9+ instances : 1
Original file line number Diff line number Diff line change 1+ # Copyright 2016 Google Inc. All Rights Reserved.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ import webapp2
16+
17+
18+ class IndexHandler (webapp2 .RequestHandler ):
19+ def get (self ):
20+ self .response .out .write ('Index.' )
21+
22+
23+ app = webapp2 .WSGIApplication ([
24+ ('/' , IndexHandler ),
25+ ], debug = True )
You can’t perform that action at this time.
0 commit comments