-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Dockerfile and Lambda handler.
- Loading branch information
1 parent
3c65d87
commit 61d3dfb
Showing
6 changed files
with
36 additions
and
3 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,2 @@ | ||
scripts | ||
tests |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ __pycache__ | |
/.coverage | ||
/.pytest_cache | ||
/.ruff_cache | ||
.idea |
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,15 @@ | ||
FROM python:3.12-slim | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN pip install --no-cache-dir --no-cache poetry | ||
|
||
COPY poetry.lock pyproject.toml / | ||
|
||
RUN poetry install --no-cache --sync --no-interaction --with lambda && \ | ||
rm poetry.lock pyproject.toml && \ | ||
pip uninstall --yes poetry | ||
|
||
COPY . /app | ||
WORKDIR /app |
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,10 @@ | ||
from fastapi import FastAPI | ||
from mangum import Mangum | ||
|
||
from stat_fastapi.api import StatApiRouter | ||
from stat_fastapi_test_backend import TestBackend | ||
|
||
app = FastAPI() | ||
app.include_router(StatApiRouter(backend=TestBackend()).router) | ||
|
||
handler = Mangum(app, lifespan="off") |
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