-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
3aa1421
commit 14959c7
Showing
15 changed files
with
1,038 additions
and
93 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM public.ecr.aws/sam/build-python3.10:latest-x86_64 | ||
|
||
ENV PATH="/root/.local/bin:/sbin:/usr/sbin:${PATH}" | ||
|
||
RUN curl -sSL https://install.python-poetry.org | python3 - | ||
|
||
RUN rpm --import https://packages.confluent.io/rpm/7.0/archive.key && \ | ||
echo '[Confluent-Clients]' > /etc/yum.repos.d/confluent.repo && \ | ||
echo 'name=Confluent Clients repository' >> /etc/yum.repos.d/confluent.repo && \ | ||
echo 'baseurl=https://packages.confluent.io/clients/rpm/centos/7/x86_64' >> /etc/yum.repos.d/confluent.repo && \ | ||
echo 'gpgcheck=1' >> /etc/yum.repos.d/confluent.repo && \ | ||
echo 'gpgkey=https://packages.confluent.io/clients/rpm/archive.key' >> /etc/yum.repos.d/confluent.repo && \ | ||
echo 'enabled=1' >> /etc/yum.repos.d/confluent.repo && \ | ||
rpm --import https://packages.confluent.io/rpm/7.0/archive.key && \ | ||
yum install -y librdkafka-devel && \ | ||
pip install --upgrade pip | ||
|
||
WORKDIR /var/task | ||
COPY . . | ||
|
||
RUN poetry config virtualenvs.create false && \ | ||
poetry install --only main --no-interaction --no-ansi && \ | ||
cd /var/lang/lib/python3.10/site-packages && \ | ||
zip -r9 /var/task/lambda.zip . && \ | ||
cd /var/task/src && \ | ||
zip -r9 /var/task/lambda.zip . |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,31 @@ | ||
[tool.poetry] | ||
name = "stac-transaction-api" | ||
version = "0.1.0" | ||
description = "West ESGF STAC Transaction API" | ||
authors = ["Lukasz Lacinski <[email protected]>"] | ||
readme = "README.md" | ||
packages = [ | ||
{ include = "src" } | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
certifi = "2024.6.2" | ||
cffi = "1.16.0" | ||
charset-normalizer = "3.3.2" | ||
cryptography = "42.0.8" | ||
globus-sdk = "3.41.0" | ||
idna = "3.7" | ||
pyjwt = "2.8.0" | ||
requests = "2.32.3" | ||
fastapi = "0.114.0" | ||
mangum = "0.17.0" | ||
stac-fastapi-types = "3.0.1" | ||
stac-fastapi-extensions = "3.0.1" | ||
stac-fastapi-api = "3.0.1" | ||
confluent-kafka = "2.3.0" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 +1,9 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$(dirname "$(realpath "$0")") | ||
cd "$SCRIPT_DIR" || exit | ||
|
||
IMAGE=stac_transaction_api | ||
|
||
SRC_DIR=src | ||
BUILD_DIR=build | ||
ZIP_FILE=lambda.zip | ||
|
||
docker build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) -t $IMAGE . | ||
|
||
cd .. | ||
if [ -e $BUILD_DIR ]; then | ||
rm -r $BUILD_DIR | ||
fi | ||
mkdir $BUILD_DIR | ||
cp requirements.txt $BUILD_DIR | ||
cp $SRC_DIR/*.py $BUILD_DIR | ||
|
||
docker run -it --rm -v $(pwd)/$BUILD_DIR:/var/task $IMAGE /bin/bash -c " | ||
cd /var/task && \ | ||
pip install -r requirements.txt -t . && \ | ||
zip -r9 $ZIP_FILE ." | ||
docker build -t $IMAGE . | ||
docker create --name temp_container $IMAGE | ||
docker cp temp_container:/var/task/$ZIP_FILE . | ||
docker rm temp_container |
This file was deleted.
Oops, something went wrong.
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
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
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
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