Skip to content

Commit 2a1e29c

Browse files
authored
allow passing server options and switch to hypercorn (#2)
* use hypercorn instead * explicitly bind hypercorn * build image on PRs * install `hypercorn`
1 parent f920102 commit 2a1e29c

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/packages.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: packages
22
on:
3-
push:
3+
release:
4+
types:
5+
- published
6+
pull_request:
47
branches:
5-
- main
6-
tags:
7-
- "*"
8+
- "main"
89
workflow_dispatch:
910

1011
jobs:
@@ -32,6 +33,6 @@ jobs:
3233
with:
3334
context: .
3435
file: Dockerfile
35-
push: true
36+
push: ${{ github.event_name == 'push' || github.event_name == 'release' }}
3637
tags: ${{ steps.meta.outputs.tags }}
3738
labels: ${{ steps.meta.outputs.labels }}

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ pypgstac[psycopg]
44
pystac
55
rich
66
git+https://github.com/iaocea/cmems-stac.git
7+
hypercorn

run-stacserver.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ until pg_isready; do
55
sleep 2
66
done
77

8-
stac-fastapi-pgstac
8+
hypercorn stac_fastapi_pgstac.app:app \
9+
-b "$APP_HOST:$APP_PORT" \
10+
$STAC_SERVER_OPTIONS

0 commit comments

Comments
 (0)