Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAC #31

Draft
wants to merge 28 commits into
base: develop
Choose a base branch
from
Draft

STAC #31

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f38dda7
Merge branch 'main' of github.com:developmentseed/pearl-backend
ingalls Nov 28, 2022
f9d1c45
Merge remote-tracking branch 'origin/develop'
ingalls Nov 28, 2022
f0df0df
Merge branch 'develop'
ingalls Nov 29, 2022
7ec14b1
Include pypgstac database tool in base image
ingalls Dec 1, 2022
4cd93ce
Setup Database migration tool with pgstac
ingalls Dec 1, 2022
0458cfc
Sketch out stac docker
ingalls Dec 5, 2022
ca2244f
FastAPI Stac
ingalls Dec 5, 2022
462f657
Continue sketching out Dockerfile for STAC API
ingalls Dec 5, 2022
62dc2df
Add __init__
ingalls Dec 5, 2022
e4e1de5
Add Prelim API
ingalls Dec 5, 2022
3b7328a
Database migrations are performed by migration task
ingalls Dec 5, 2022
6a26435
Remove relative path code
ingalls Dec 5, 2022
0f57e71
Remove settings as it isn't relavent to an open api
ingalls Dec 5, 2022
3455180
Set STAC Postgres Vars
ingalls Dec 5, 2022
65bfa87
Continue refining docker-compose stac service
ingalls Dec 5, 2022
8d377a0
Get POSTGIS connection working
ingalls Dec 5, 2022
ecb41ae
Continue fixing issues in STAC startup
ingalls Dec 5, 2022
d104d66
Remove authenticated checks
ingalls Dec 5, 2022
46e9f58
Fix migration command
ingalls Dec 5, 2022
05de93a
Merge branch 'main' of github.com:developmentseed/pearl-backend into …
ingalls Dec 6, 2022
6ac1df8
Remove Transaction Extension
ingalls Dec 6, 2022
f8d6786
Add STAC Item Endpoint
ingalls Dec 6, 2022
3b5f217
Add Trimed down AOI STAC test
ingalls Dec 6, 2022
637f770
Set up /stac tests
ingalls Dec 6, 2022
241abb7
Call STAC item insertion
ingalls Dec 6, 2022
62171d8
Upsert Collection & item
ingalls Dec 6, 2022
682d691
Publish STAC Item
ingalls Dec 6, 2022
9775747
add basic asset
ingalls Dec 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ services:
- Postgres=postgres://docker:docker@postgis:5432/gis
- AZURE_STORAGE_CONNECTION_STRING

stac:
platform: linux/amd64
build: ./services/stac/
restart: always
links:
- postgis
depends_on:
- migration
ports:
- "2002:2002"
environment:
- POSTGRES_PASS=docker
- POSTGRES_USER=docker
- POSTGRES_DBNAME=gis
- POSTGRES_HOST=postgis
- POSTGRES_PORT=5432
- POSTGRES_HOST_READER=postgis
- POSTGRES_HOST_WRITER=postgis

postgis:
platform: linux/amd64
image: kartoza/postgis:13.0
Expand Down Expand Up @@ -63,7 +82,7 @@ services:
migration:
platform: linux/amd64
build: ./services/api
command: sh -c "sleep 20; npx knex migrate:latest"
command: bash -c "echo $${Postgres} && pypgstac --dsn=$${Postgres} pgready && npx knex migrate:latest && pypgstac --dsn=$${Postgres} migrate"
links:
- postgis
ports:
Expand Down
72 changes: 36 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion services/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.17

RUN apk add --no-cache bash nodejs npm
RUN apk add --no-cache bash nodejs npm python3 py3-pip

EXPOSE 2000

Expand All @@ -9,6 +9,8 @@ WORKDIR $HOME
COPY ./ $HOME/api
WORKDIR $HOME/api

RUN pip install pypgstac[psycopg]

RUN npm install \
&& npm run doc

Expand Down
19 changes: 19 additions & 0 deletions services/api/doc/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,25 @@ Note: this is an internal API that is called by the websocket GPU
*/


/**
* @api {post} /project/:projectid/aoi/:aoiid/stac Create STAC
* @apiVersion 1.0.0
* @apiName POST-/project/:projectid/aoi/:aoiid/stac
* @apiGroup AOI
* @apiPermission user
*
* @apidescription
* Post the AOI to the public STAC Catalogue
*
* @apiParam {integer} projectid param
* @apiParam {integer} aoiid param
*
*
* @apiSchema (Body) {jsonschema=../schema/req.body.CreateStac.json} apiParam
* @apiSchema {jsonschema=../schema/res.Standard.json} apiSuccess
*/


/**
* @api {get} /share/:shareuuid Get Share
* @apiVersion 1.0.0
Expand Down
Loading