From 652c52937c556e5b568337b710d04315ff1330b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Jedlicska?= Date: Tue, 3 Sep 2024 08:54:06 +0000 Subject: [PATCH 1/2] add start script and reverse proxy config --- .gitignore | 3 +++ Caddyfile | 3 +++ example-config.yml | 2 +- requirements.txt | 1 + start.sh | 8 ++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Caddyfile create mode 100755 start.sh diff --git a/.gitignore b/.gitignore index 1086699..00ba0bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +access_log +error_log + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..e42ae54 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,3 @@ +geo.speckle.systems { + reverse_proxy localhost:8000 +} diff --git a/example-config.yml b/example-config.yml index 878b18e..8bdf348 100644 --- a/example-config.yml +++ b/example-config.yml @@ -128,4 +128,4 @@ resources: hello-world: type: process processor: - name: HelloWorld \ No newline at end of file + name: HelloWorld diff --git a/requirements.txt b/requirements.txt index ef0f47d..72d59b8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,3 +17,4 @@ shapely SQLAlchemy<2.0.0 tinydb unicodecsv +specklepy diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..8c10552 --- /dev/null +++ b/start.sh @@ -0,0 +1,8 @@ +source .venv/bin/activate + +export PYGEOAPI_CONFIG="example-config.yml" +export PYGEOAPI_OPENAPI="example-openapi.yml" +export MAPTILER_KEY_LOCAL="qam9vwl7bVk5tW1oZu46" +export PORT=8000 + +gunicorn pygeoapi.flask_app:APP --timeout 100000 --access-logfile access_log --error-logfile error_log --capture-output From 5ec81ea745cd732bfbbe663fd485e878276ad618 Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Fri, 6 Sep 2024 18:12:09 +0100 Subject: [PATCH 2/2] fixes --- requirements.txt | 2 +- start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 72d59b8..691c43c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,4 +17,4 @@ shapely SQLAlchemy<2.0.0 tinydb unicodecsv -specklepy +specklepy==2.19.6 diff --git a/start.sh b/start.sh index 8c10552..955a496 100755 --- a/start.sh +++ b/start.sh @@ -2,7 +2,7 @@ source .venv/bin/activate export PYGEOAPI_CONFIG="example-config.yml" export PYGEOAPI_OPENAPI="example-openapi.yml" -export MAPTILER_KEY_LOCAL="qam9vwl7bVk5tW1oZu46" +export MAPTILER_KEY_SPECKLE="qam9vwl7bVk5tW1oZu46" export PORT=8000 gunicorn pygeoapi.flask_app:APP --timeout 100000 --access-logfile access_log --error-logfile error_log --capture-output