Skip to content

Commit

Permalink
feat: export 90
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Mar 19, 2024
1 parent 9b7bcdb commit 01cbdf2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .aws/task_definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"essential": true,
"command": [
"app.handler"
"app:app"
],
"environment": [],
"environmentFiles": [
Expand Down
2 changes: 1 addition & 1 deletion .aws/task_definition_preview.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"command": [
"app.handler"
"app:app"
],
"essential": true,
"environment": [],
Expand Down
8 changes: 6 additions & 2 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM public.ecr.aws/lambda/python:3.10
# Using a slim version for a smaller base image
FROM python:3.11.6-slim-bullseye

# Copy function code
COPY . ${LAMBDA_TASK_ROOT}
# from your project folder.
COPY requirements.txt .
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" -U --no-cache-dir

CMD [ "app.handler" ]
EXPOSE 5050

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80", "--workers", "6"]
2 changes: 1 addition & 1 deletion server/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" -U --no-cach

EXPOSE 5050

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5050", "--workers", "6"]
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80", "--workers", "6"]

0 comments on commit 01cbdf2

Please sign in to comment.