"백엔드_핵심_로직_구현_프론트엔드_연동_및_도커_배포_최적화_완료"

This commit is contained in:
2026-02-03 00:52:54 +09:00
parent ed8fc0943b
commit eeddc62089
32 changed files with 1287 additions and 318 deletions

View File

@@ -12,23 +12,29 @@ FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies (if needed for TA-Lib or others)
# RUN apt-get update && apt-get install -y gcc ...
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy backend requirements
COPY ./backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend code
COPY ./backend ./backend
# Copy backend code (contents of backend folder to /app)
COPY ./backend/ .
# Copy frontend build artifacts to backend static folder
COPY --from=frontend-build /app/frontend/dist ./backend/static
# Copy frontend build artifacts to /app/static
COPY --from=frontend-build /app/frontend/dist ./static
# Ensure data directory exists
RUN mkdir -p /app/data
# Environment variables
ENV PORT=80
EXPOSE 80
# Run FastAPI server
# Assuming main.py is in backend folder and app object is named 'app'
CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "80"]
# Since app/ is now directly in /app, uvicorn app.main:app works
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]