mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
set up docker and handler
This commit is contained in:
parent
047cf031a5
commit
8a17ea7265
3 changed files with 26 additions and 0 deletions
16
backend/pashub_fetcher/handler/Dockerfile
Normal file
16
backend/pashub_fetcher/handler/Dockerfile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FROM mcr.microsoft.com/playwright/python:v1.42.0
|
||||
|
||||
# Set working directory (Lambda task root)
|
||||
WORKDIR /var/task
|
||||
|
||||
COPY backend/.env.test backend/.env
|
||||
|
||||
COPY utils/ utils/
|
||||
COPY backend/pashub_fetcher/ backend/pashub_fetcher/
|
||||
|
||||
# -----------------------------
|
||||
# Lambda handler
|
||||
# -----------------------------
|
||||
# CMD ["backend/pashub_fetcher/handler/handler.handler"]
|
||||
# For local running
|
||||
CMD ["python", "-m", "backend.pashub_fetcher.handler.handler"]
|
||||
10
backend/pashub_fetcher/handler/handler.py
Normal file
10
backend/pashub_fetcher/handler/handler.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from typing import Any, Mapping
|
||||
|
||||
from utils.logger import setup_logger
|
||||
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
|
||||
def handler(event: Mapping[str, Any], context: Any) -> None:
|
||||
logger.info("Recevied message")
|
||||
0
backend/pashub_fetcher/processor.py
Normal file
0
backend/pashub_fetcher/processor.py
Normal file
Loading…
Add table
Reference in a new issue