Adapt for Google Cloud Deployment

This commit is contained in:
Phillip Kühne 2021-08-20 15:47:03 +02:00
parent 080648d587
commit 9ab1e9b841
5 changed files with 38 additions and 2 deletions

19
backend/app/.gcloudignore Normal file
View File

@ -0,0 +1,19 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore
# Python pycache:
__pycache__/
# Ignored by the build system
/setup.cfg

13
backend/app/app.yaml Normal file
View File

@ -0,0 +1,13 @@
runtime: python39
handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: static
# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
script: auto

View File

@ -10,7 +10,7 @@ index_label = "Id"
done_table = "done_songs" done_table = "done_songs"
def open_db(): def open_db():
conn = sqlite3.connect("data/test.db") conn = sqlite3.connect("/tmp/karaoqueue.db")
conn.execute('PRAGMA encoding = "UTF-8";') conn.execute('PRAGMA encoding = "UTF-8";')
return conn return conn

View File

@ -152,4 +152,4 @@ def activate_job():
if __name__ == "__main__": if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0') app.run(host='127.0.0.1', port=8080, debug=True)

View File

@ -0,0 +1,4 @@
requests
pandas
Flask-BasicAuth
bs4