diff --git a/backend/Dockerfile b/backend/Dockerfile index 4c8ef13..b28fe05 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,14 +3,16 @@ FROM python:3.14-alpine ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV PORT=8080 +ENV PYTHONPATH=/app WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -COPY ./app . +COPY . . +WORKDIR /app/backend RUN mkdir -p /app/data EXPOSE $PORT -CMD ["sh", "-c", "gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:$PORT"] \ No newline at end of file +CMD ["sh", "-c", "gunicorn -w 4 -k uvicorn.workers.UvicornWorker app.main:app --bind 0.0.0.0:$PORT"] \ No newline at end of file diff --git a/backend/app/main.py b/backend/app/main.py index 4f55f4b..a76371e 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -3,8 +3,8 @@ from contextlib import asynccontextmanager from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware -from .database import Base, engine -from .routes import auth, tournaments, websocket +from database import Base, engine +from routes import auth, tournaments, websocket @asynccontextmanager