Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
FROM python:3.9

# Set working directory.

WORKDIR /fastapi
COPY ./requirements.txt /fastapi/requirements.txt
# Expose port 8000 for your FastAPI server.

EXPOSE 8000
# Install Python requirements using Pip.

RUN pip install -r requirements.txt
# Copy your codebase into the Docker container.

COPY ./* /fastapi/
# Run FastAPI server on the port exposed above.
CMD [ "uvicorn" ,"main:app", "--reload" ]
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def get_personal_message() -> str:
# Modify the personal message as desired.
name: str = "___"
name: str = "Sri Ram"
return f"Hello, my name's {name}."