Skip to content

Commit 1a49798

Browse files
committed
๐Ÿš‘๏ธ ์ปจํ…Œ์ด๋„ˆ ์ตœ์‹ ํ™” ๋ฌธ์ œ ํ•ด๊ฒฐ
1 parent 98beaee commit 1a49798

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

โ€ŽDockerfileโ€Ž

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ WORKDIR /app
77
# Install system dependencies
88
RUN apt update && apt install -y \
99
build-essential \
10+
libpq-dev \
1011
&& rm -rf /var/lib/apt/lists/*
1112

1213
# Install poetry
@@ -26,6 +27,11 @@ FROM python:3.12-slim
2627

2728
WORKDIR /app
2829

30+
# Install system dependencies for psycopg2
31+
RUN apt update && apt install -y \
32+
libpq-dev \
33+
&& rm -rf /var/lib/apt/lists/*
34+
2935
# Copy installed packages from builder
3036
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
3137
COPY --from=builder /usr/local/bin /usr/local/bin
@@ -41,4 +47,4 @@ ENV BUILD_DATE=$BUILD_DATE
4147
EXPOSE 8000
4248

4349
# Command to run the application with --reload option for development
44-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
50+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-dir", "/app"]

โ€Žapp/main.pyโ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ async def lifespan(app: FastAPI):
2929
version="0.0.1",
3030
debug=settings.DB_ECHO_LOG,
3131
lifespan=lifespan,
32+
openapi_url="/openapi.json",
33+
docs_url="/docs",
34+
redoc_url="/redoc",
3235
)
3336

3437
allow_origins = [

0 commit comments

Comments
ย (0)