demo / Dockerfile copy
tekville's picture
Initial commit
ff72db3
raw
history blame contribute delete
645 Bytes
# Python 3.11 ์ด๋ฏธ์ง€ ์‚ฌ์šฉ
FROM python:3.11-slim
# ์ž‘์—… ๋””๋ ‰ํ„ฐ๋ฆฌ ์„ค์ •
WORKDIR /app
# ์‹œ์Šคํ…œ ํŒจํ‚ค์ง€ ์—…๋ฐ์ดํŠธ ๋ฐ ํ•„์ˆ˜ ํŒจํ‚ค์ง€ ์„ค์น˜
RUN apt-get update && apt-get install -y \
build-essential \
libmariadb-dev \
&& rm -rf /var/lib/apt/lists/*
# ์˜์กด์„ฑ ํŒŒ์ผ ๋ณต์‚ฌ
COPY requirements.txt .
# Python ํŒจํ‚ค์ง€ ์„ค์น˜
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ฝ”๋“œ ๋ณต์‚ฌ
COPY . .
# ํฌํŠธ ๋…ธ์ถœ (FastAPI ๊ธฐ๋ณธ ํฌํŠธ: 8000)
EXPOSE 8000
# FastAPI ์‹คํ–‰ ๋ช…๋ น
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]