From 3232f7d5ad40c376fca6a9301166119420921717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pracha=C5=99?= <jan.prachar@gmail.com> Date: Thu, 18 Feb 2021 01:19:52 +0100 Subject: [PATCH] Google App Engine things --- .gcloudignore | 27 +++++++++++++++++++++++++++ README.md | 4 ++-- app.yaml | 2 ++ bin/deploy | 2 +- constraints.txt => requirements.txt | 2 +- 5 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .gcloudignore create mode 100644 app.yaml rename constraints.txt => requirements.txt (95%) diff --git a/.gcloudignore b/.gcloudignore new file mode 100644 index 00000000..5e218c86 --- /dev/null +++ b/.gcloudignore @@ -0,0 +1,27 @@ +# 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 +#!include:.gitignore +!/mo/config.py + +# Python pycache: +__pycache__/ +# Ignored by the build system +/setup.cfg + +/bin +/db +/doc +/etc +/cloud_sql_proxy diff --git a/README.md b/README.md index 150d207b..7e3c38bb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ python3 -m venv venv . venv/bin/activate pip install wheel - pip install -c constraints.txt --editable . + pip install -c requirements.txt --editable . # vytvořit mo/config.py podle etc/config.py.example mkdir -p data/imports @@ -72,4 +72,4 @@ ## Mražení závislostí - pip freeze | grep -v '^osmo=' >constraints.txt + pip freeze | grep -v '^osmo=' >requirements.txt diff --git a/app.yaml b/app.yaml new file mode 100644 index 00000000..36aa2873 --- /dev/null +++ b/app.yaml @@ -0,0 +1,2 @@ +runtime: python39 +entrypoint: gunicorn -b :$PORT -w 1 mo.web:app diff --git a/bin/deploy b/bin/deploy index 01b4d38e..e24744e7 100755 --- a/bin/deploy +++ b/bin/deploy @@ -26,7 +26,7 @@ echo "Zakládám adresáře" mkdir -p $DEST/{log,var,data/{errors,imports,jobs,statements,submits,tmp}} echo "Instaluji balíček" -pip install -c constraints.txt . +pip install -c requirements.txt . for d in $DEST/venv/lib/python*/site-packages/mo ; do if [ ! -f $d/config.py ] ; then diff --git a/constraints.txt b/requirements.txt similarity index 95% rename from constraints.txt rename to requirements.txt index 9c4dbd34..9d77dc29 100644 --- a/constraints.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ Flask==1.1.2 Flask-Bootstrap==3.3.7.1 Flask-SQLAlchemy==2.4.4 Flask-WTF==0.14.3 +gunicorn==20.0.4 itsdangerous==1.1.0 Jinja2==2.11.2 lxml==4.6.2 @@ -16,7 +17,6 @@ markdown==3.3.4 MarkupSafe==1.1.1 pikepdf==2.3.0 Pillow==8.1.0 -pkg-resources==0.0.0 psycopg2==2.8.6 pycparser==2.20 python-dateutil==2.8.1 -- GitLab