Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Commit

Permalink
Support Google App Engine deployment
Browse files Browse the repository at this point in the history
Add a couple of App Engine specific files and add some instructions to
README.md to allow deployment to Google App Engine.

Signed-off-by: Sean Paul <[email protected]>
  • Loading branch information
atseanpaul committed Aug 21, 2018
1 parent 5fe656a commit 688a103
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
app/static/build
.sass-cache
*.swp
lib/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ Modern Paste is intended for system administrators who wish to host their own in
```
If you visit `http://modernpaste.example.com`, you should be presented with your installation of Modern Paste.

7. **Deploying on Google App Engine.**
In order to deploy on Google App Engine (GAE), you should complete steps 1 & 2 above. For step 3, you need to decide whether you would like to use Google Cloud SQL, or a traditional MySQL server hosted elsewhere. If you choose the former, create an instance and database in your Cloud project. Complete Step 4, paying attention to the parts which are different for GAE deployments (most notably Cloud SQL config). Build the app locally per Step 5, and once completed run 'pip install -r requirements.txt -t lib/' to install your requirements in the lib folder for GAE. You should now be able to test and deploy your code with dev_appserver.py/cloud sql proxy and gcloud.

## Contributing

Contributions from the developer community lie at the heart of open source software. Contributions to Modern Paste--in the form of new features, bug fixes, or anything else--are encouraged and always welcome. Please read the Workflow section carefully on how to get started. The Continuous Integration and Testing sections describe practices on ensuring the integrity of Modern Paste.
Expand Down
17 changes: 17 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
script: wsgi.application

libraries:
- name: flask
version: latest
- name: pycrypto
version: latest
- name: ssl
version: latest
- name: MySQLdb
version: latest
4 changes: 4 additions & 0 deletions appengine_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from google.appengine.ext import vendor

# Add any libraries installed in the "lib" folder.
vendor.add('lib')

0 comments on commit 688a103

Please sign in to comment.