downgrade cryptography

This commit is contained in:
Khalim Conn-Kowlessar 2023-07-17 19:23:09 +01:00
parent 7dc369b088
commit 1bb3fe5b12
5 changed files with 33 additions and 13 deletions

View file

@ -1,5 +1,5 @@
# Pull base image
FROM python:3.10.12-slim-buster
FROM public.ecr.aws/lambda/python:3.10
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1

View file

@ -1,11 +0,0 @@
FROM python:3.10.12-slim-buster
WORKDIR /var/task
# Install python dependencies
COPY ./requirements/base.txt ./requirements/base.txt
RUN pip install --upgrade pip
RUN pip install -r requirements/base.txt
# Copy project
COPY . .

View file

@ -0,0 +1,22 @@
FROM public.ecr.aws/lambda/python:3.10
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app
# Install system dependencies
#RUN apt-get update && apt-get install -y netcat-openbsd
# Install python dependencies
COPY ./requirements/base.txt ./requirements/base.txt
RUN pip install --upgrade pip
RUN pip install -r requirements/base.txt
# Copy project
COPY . .
# command to run on container start
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

View file

@ -1,7 +1,7 @@
anyio==3.7.1
cffi==1.15.1
click==8.1.3
cryptography==41.0.1
cryptography==37.0.4
ecdsa==0.18.0
exceptiongroup==1.1.2
fastapi==0.99.1

9
backend/test_event.json Normal file
View file

@ -0,0 +1,9 @@
{
"httpMethod": "POST",
"path": "/v1/plan/trigger",
"headers": {
"x-api-key": "4QPwbB6hEdUloDVtbBJCUTfGBdBgWwpeavWQ7t5Z",
"Authorization": "Bearer 4QPwbB6hEdUloDVtbBJCUTfGBdBgWwpeavWQ7t5Z"
},
"body": "{\"goal\": \"epc\", \"goal_value\": \"c\", \"portfolio_id\": 1, \"trigger_file_path\": \"test\", \"housing_type\": \"social\"}"
}