File size: 562 Bytes
74ecc4f
 
 
 
6f5f8a1
 
 
 
 
 
31bb0e6
d16fd19
 
 
 
05713eb
6f5f8a1
d16fd19
74ecc4f
d16fd19
74ecc4f
6f5f8a1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.9

WORKDIR /app

# Fix: Corrected apt-get command
RUN apt-get update && apt-get install -y \
    libevent-dev \
    python3-dev \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# Ensure the folder exists and is writable by the container user
RUN mkdir -p saved_music && chmod 777 saved_music

EXPOSE 7860

# Use eventlet for Socket.IO compatibility
CMD ["gunicorn", "--worker-class", "eventlet", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"]