File size: 873 Bytes
f83864a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6b1e8b6
 
f83864a
 
bc89a24
 
ef63223
f83864a
 
 
 
2d72c5a
f83864a
6b1e8b6
f83864a
3d16794
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
31
32
33
34
35
# Use a modern, supported Debian base (Bookworm)
FROM python:3.9-slim-bookworm

# Set environment variables to keep apt quiet
ENV DEBIAN_FRONTEND=noninteractive

# Combine updates and installs into one layer to save space
RUN apt-get update && apt-get upgrade -y && \
    apt-get install -y --no-install-recommends \
    git \
    curl \
    wget \
    bash \
    neofetch \
    ffmpeg \
    software-properties-common && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY . /app

# Upgrade pip and install requirements
RUN pip3 install --no-cache-dir -U pip redis fastapi nest-asyncio uvicorn && \
    pip3 install --no-cache-dir -r requirements.txt

# Permissions
# Note: Changing permissions on /usr is generally discouraged unless strictly necessary
RUN chown -R 1000:0 /app && \
    chmod -R 755 /app && \
    chmod +x /app/start

EXPOSE 5000 8000 

CMD ["./start"]