File size: 697 Bytes
ef6fa9a
1abc28d
 
 
ef6fa9a
 
 
 
 
 
 
ea630f6
 
ef6fa9a
56531d1
1abc28d
 
 
ef6fa9a
56531d1
 
ef6fa9a
56531d1
ddc1904
ef6fa9a
56531d1
7d2c567
ddc1904
7d2c567
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
29
30
# Use Python 3.11 as the base image
# FROM python:3.11
FROM python:3.11-slim 


# Set the working directory inside the container
WORKDIR /app

# Copy all project files into the container
COPY . /app

RUN mkdir -p /app/logs && chmod -R 777 /app/logs

# Install dependencies
RUN pip install --upgrade pip
# Disable cache for pip installs
RUN pip install --no-cache-dir -r requirement.txt


# Set PYTHONPATH so FastAPI can find the 'backend' module
ENV PYTHONPATH=/app

# Expose the required port
EXPOSE 7860

# Start FastAPI with the correct module path
# CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]