Spaces:
Sleeping
Sleeping
File size: 687 Bytes
3b87fce 3f9066c 3b87fce 3f9066c 3b87fce 3f9066c 3b87fce 3f9066c 3b87fce 3f9066c 3b87fce 3f9066c 3b87fce 04917ee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# ๋ฒ ์ด์ค ์ด๋ฏธ์ง: ๊ฒฝ๋ + ๋ณด์ ์
๋ฐ์ดํธ ์ต์
FROM python:3.11-slim
# ํ์ ํจํค์ง (ํ ๋น๋ ๋๋น)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl ca-certificates git && \
rm -rf /var/lib/apt/lists/*
# ์ํน ๋๋ ํฐ๋ฆฌ
WORKDIR /app
# ์์กด์ฑ ๋จผ์ ๋ณต์ฌ โ ์บ์ ํ์ฉ
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# ์ ํ๋ฆฌ์ผ์ด์
์ ์ฒด ๋ณต์ฌ
COPY . /app
# ๋น๋ฃจํธ ์ ์ ๋ก ์ ํ (๋ณด์)
RUN useradd -m appuser && chown -R appuser:appuser /app
USER appuser
# ํฌํธ/ํ๊ฒฝ
ENV PORT=7860
EXPOSE 7860
# ์คํ
CMD ["python", "-m", "app.main"] |