Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python-webapp2-vanilla/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
11 changes: 11 additions & 0 deletions python-webapp2-vanilla/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM jin09/webapp2

MAINTAINER Gautam Jain <[email protected]>

RUN mkdir /home/src/

COPY /app /home/src/

RUN pip install -r /home/src/requirements.txt

CMD ["python", "/home/src/main.py"]
5 changes: 5 additions & 0 deletions python-webapp2-vanilla/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Webapp2 Without App Engine SDK

## PORT

Default Port for application is `8080`.
4 changes: 4 additions & 0 deletions python-webapp2-vanilla/app/docker-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
image: "python2.7-webapp2_vanilla:0.1"
port: 8080
volume_mounts: null
env_variables: []
16 changes: 16 additions & 0 deletions python-webapp2-vanilla/app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import webapp2

class HelloWebapp2(webapp2.RequestHandler):
def get(self):
self.response.write('Hello, webapp2!')

app = webapp2.WSGIApplication([
('/', HelloWebapp2),
], debug=True)

def main():
from paste import httpserver
httpserver.serve(app, host='0.0.0.0', port='8080')

if __name__ == '__main__':
main()
Empty file.
1 change: 1 addition & 0 deletions python-webapp2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pyc
15 changes: 15 additions & 0 deletions python-webapp2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM jin09/app_engine

MAINTAINER Gautam Jain <[email protected]>

RUN mkdir /home/src/

COPY /app /home/src/

# RUN ls -la /home/src/*

# RUN rm -f /home/src/Dockerfile

RUN pip install -r /home/src/requirements.txt

CMD ["python", "/home/google_appengine/dev_appserver.py", "/home/src/app.yaml", "--skip_sdk_update_check=yes", "--host", "0.0.0.0", "--port", "8080"]
7 changes: 7 additions & 0 deletions python-webapp2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Webapp2 With App Engine SDK

Developer can leverage the App Engine services as well eg. Datastore, Memcache etc.

## PORT

Default Port for application is `8080`.
17 changes: 17 additions & 0 deletions python-webapp2/app/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
application: python-webapp2
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico

- url: .*
script: main.app

libraries:
- name: webapp2
version: "2.5.2"
4 changes: 4 additions & 0 deletions python-webapp2/app/docker-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
image: "python2.7-webapp2:0.1"
port: 8080
volume_mounts: null
env_variables: []
27 changes: 27 additions & 0 deletions python-webapp2/app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import webapp2


class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello world!')


app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
1 change: 1 addition & 0 deletions python-webapp2/app/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
webapp2