From ee94f5194469e1b30ef1c5c4b74617eef1c5937d Mon Sep 17 00:00:00 2001 From: javapark Date: Sat, 20 Jan 2024 19:06:32 +0900 Subject: [PATCH] =?UTF-8?q?python=20=EC=84=A4=EC=B9=98=ED=95=98=EA=B8=B0?= =?UTF-8?q?=20=EC=8B=AB=EC=96=B4=EC=84=9C=20=EB=8F=84=EC=BB=A4=EB=A1=9C=20?= =?UTF-8?q?=EB=9D=84=EC=9A=B0=EA=B3=A0=20=ED=85=8C=EC=8A=A4=ED=81=AC=20?= =?UTF-8?q?=ED=95=B4=EB=B4=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 15 +++++++++++++++ docker-compose.yml | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..523c0f405 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# 최신 Python 이미지 사용 +FROM python:3.12.1-slim + +# 작업 디렉토리 설정 +WORKDIR /app + +# 의존성 파일 복사 및 설치 +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# 나머지 파일 복사 +COPY . . + +# FastAPI 실행 명령 +CMD ["uvicorn", "main:app", "--reload","--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..0057f72f5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3.8' +services: + web: + build: . + volumes: + - .:/app + ports: + - "8000:8000" \ No newline at end of file