-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
4,937 additions
and
1,315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: stac-fastapi-mongo | ||
name: stac-fastapi-elasticsearch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
@@ -7,123 +8,123 @@ name: stac-fastapi-mongo | |
- main | ||
- features/** | ||
|
||
# jobs: | ||
# test: | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 10 | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
# services: | ||
services: | ||
|
||
# elasticsearch_8_svc: | ||
# image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0 | ||
# env: | ||
# cluster.name: stac-cluster | ||
# node.name: es01 | ||
# network.host: 0.0.0.0 | ||
# transport.host: 0.0.0.0 | ||
# discovery.type: single-node | ||
# http.port: 9200 | ||
# xpack.license.self_generated.type: basic | ||
# xpack.security.enabled: false | ||
# xpack.security.transport.ssl.enabled: false | ||
# ES_JAVA_OPTS: -Xms512m -Xmx1g | ||
# ports: | ||
# - 9200:9200 | ||
elasticsearch_8_svc: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0 | ||
env: | ||
cluster.name: stac-cluster | ||
node.name: es01 | ||
network.host: 0.0.0.0 | ||
transport.host: 0.0.0.0 | ||
discovery.type: single-node | ||
http.port: 9200 | ||
xpack.license.self_generated.type: basic | ||
xpack.security.enabled: false | ||
xpack.security.transport.ssl.enabled: false | ||
ES_JAVA_OPTS: -Xms512m -Xmx1g | ||
ports: | ||
- 9200:9200 | ||
|
||
# elasticsearch_7_svc: | ||
# image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1 | ||
# env: | ||
# cluster.name: stac-cluster | ||
# node.name: es01 | ||
# network.host: 0.0.0.0 | ||
# transport.host: 0.0.0.0 | ||
# discovery.type: single-node | ||
# http.port: 9400 | ||
# xpack.license.self_generated.type: basic | ||
# xpack.security.enabled: false | ||
# xpack.security.transport.ssl.enabled: false | ||
# ES_JAVA_OPTS: -Xms512m -Xmx1g | ||
# ports: | ||
# - 9400:9400 | ||
elasticsearch_7_svc: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1 | ||
env: | ||
cluster.name: stac-cluster | ||
node.name: es01 | ||
network.host: 0.0.0.0 | ||
transport.host: 0.0.0.0 | ||
discovery.type: single-node | ||
http.port: 9400 | ||
xpack.license.self_generated.type: basic | ||
xpack.security.enabled: false | ||
xpack.security.transport.ssl.enabled: false | ||
ES_JAVA_OPTS: -Xms512m -Xmx1g | ||
ports: | ||
- 9400:9400 | ||
|
||
# opensearch_2_11: | ||
# image: opensearchproject/opensearch:2.11.1 | ||
# env: | ||
# cluster.name: stac-cluster | ||
# node.name: os01 | ||
# network.host: 0.0.0.0 | ||
# transport.host: 0.0.0.0 | ||
# discovery.type: single-node | ||
# http.port: 9202 | ||
# http.cors.enabled: true | ||
# plugins.security.disabled: true | ||
# plugins.security.ssl.http.enabled: true | ||
# OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m | ||
# ports: | ||
# - 9202:9202 | ||
# strategy: | ||
# matrix: | ||
# python-version: [ "3.8", "3.9", "3.10", "3.11"] | ||
opensearch_2_11: | ||
image: opensearchproject/opensearch:2.11.1 | ||
env: | ||
cluster.name: stac-cluster | ||
node.name: os01 | ||
network.host: 0.0.0.0 | ||
transport.host: 0.0.0.0 | ||
discovery.type: single-node | ||
http.port: 9202 | ||
http.cors.enabled: true | ||
plugins.security.disabled: true | ||
plugins.security.ssl.http.enabled: true | ||
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m | ||
ports: | ||
- 9202:9202 | ||
strategy: | ||
matrix: | ||
python-version: [ "3.8", "3.9", "3.10", "3.11"] | ||
|
||
# name: Python ${{ matrix.python-version }} testing | ||
name: Python ${{ matrix.python-version }} testing | ||
|
||
# steps: | ||
# - name: Check out repository code | ||
# uses: actions/checkout@v4 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
# # Setup Python (faster than using Python container) | ||
# - name: Setup Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Lint code | ||
# uses: pre-commit/[email protected] | ||
# Setup Python (faster than using Python container) | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Lint code | ||
uses: pre-commit/[email protected] | ||
|
||
# - name: Install pipenv | ||
# run: | | ||
# python -m pip install --upgrade pipenv wheel | ||
- name: Install pipenv | ||
run: | | ||
python -m pip install --upgrade pipenv wheel | ||
# - name: Install elasticsearch stac-fastapi | ||
# run: | | ||
# pip install ./stac_fastapi/elasticsearch[dev,server] | ||
- name: Install elasticsearch stac-fastapi | ||
run: | | ||
pip install ./stac_fastapi/elasticsearch[dev,server] | ||
# - name: Install opensearch stac-fastapi | ||
# run: | | ||
# pip install ./stac_fastapi/opensearch[dev,server] | ||
- name: Install opensearch stac-fastapi | ||
run: | | ||
pip install ./stac_fastapi/opensearch[dev,server] | ||
# - name: Install core library stac-fastapi | ||
# run: | | ||
# pip install ./stac_fastapi/core | ||
- name: Install core library stac-fastapi | ||
run: | | ||
pip install ./stac_fastapi/core | ||
# - name: Run test suite against Elasticsearch 7.x | ||
# run: | | ||
# pipenv run pytest -svvv | ||
# env: | ||
# ENVIRONMENT: testing | ||
# ES_PORT: 9200 | ||
# ES_HOST: 172.17.0.1 | ||
# ES_USE_SSL: false | ||
# ES_VERIFY_CERTS: false | ||
# BACKEND: elasticsearch | ||
- name: Run test suite against Elasticsearch 7.x | ||
run: | | ||
pipenv run pytest -svvv | ||
env: | ||
ENVIRONMENT: testing | ||
ES_PORT: 9200 | ||
ES_HOST: 172.17.0.1 | ||
ES_USE_SSL: false | ||
ES_VERIFY_CERTS: false | ||
BACKEND: elasticsearch | ||
|
||
# - name: Run test suite against Elasticsearch 8.x | ||
# run: | | ||
# pipenv run pytest -svvv | ||
# env: | ||
# ENVIRONMENT: testing | ||
# ES_PORT: 9400 | ||
# ES_HOST: 172.17.0.1 | ||
# ES_USE_SSL: false | ||
# ES_VERIFY_CERTS: false | ||
# BACKEND: elasticsearch | ||
- name: Run test suite against Elasticsearch 8.x | ||
run: | | ||
pipenv run pytest -svvv | ||
env: | ||
ENVIRONMENT: testing | ||
ES_PORT: 9400 | ||
ES_HOST: 172.17.0.1 | ||
ES_USE_SSL: false | ||
ES_VERIFY_CERTS: false | ||
BACKEND: elasticsearch | ||
|
||
# - name: Run test suite against OpenSearch 2.11.1 | ||
# run: | | ||
# pipenv run pytest -svvv | ||
# env: | ||
# ENVIRONMENT: testing | ||
# ES_PORT: 9202 | ||
# ES_HOST: 172.17.0.1 | ||
# ES_USE_SSL: false | ||
# ES_VERIFY_CERTS: false | ||
# BACKEND: opensearch | ||
- name: Run test suite against OpenSearch 2.11.1 | ||
run: | | ||
pipenv run pytest -svvv | ||
env: | ||
ENVIRONMENT: testing | ||
ES_PORT: 9202 | ||
ES_HOST: 172.17.0.1 | ||
ES_USE_SSL: false | ||
ES_VERIFY_CERTS: false | ||
BACKEND: opensearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM python:3.10-slim | ||
|
||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y install gcc && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt | ||
|
||
WORKDIR /app | ||
|
||
COPY . /app | ||
|
||
RUN pip install --no-cache-dir -e ./stac_fastapi/core | ||
RUN pip install --no-cache-dir ./stac_fastapi/elasticsearch[server] | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["uvicorn", "stac_fastapi.elasticsearch.app:app", "--host", "0.0.0.0", "--port", "8080"] |
Oops, something went wrong.