File size: 696 Bytes
83416ca
c1b5ed3
5f10bee
54895ac
83416ca
 
 
 
 
 
 
 
 
 
54895ac
 
 
 
c1b5ed3
 
83416ca
c1b5ed3
83416ca
 
 
 
 
 
c1b5ed3
 
 
 
83416ca
 
 
 
 
 
c1b5ed3
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
36
37
38
39
40
FROM python:3.11-slim

USER root

WORKDIR /app

RUN apt-get update && apt-get install -y \
    curl \
    wget \
    sudo \
    ffmpeg \
    nodejs \
    npm \
    && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
    && apt-get install -y nodejs \
    && rm -rf /var/lib/apt/lists/*
    
RUN useradd -m -u 1000 appuser && \
    echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

RUN pip install --no-cache-dir yt-dlp

COPY package*.json ./
RUN npm install

COPY . .

RUN mkdir -p downloads && \
    chown -R appuser:appuser /app && \
    chmod +x start.sh && \
    chmod 777 downloads

USER appuser

EXPOSE 7860
ENV PORT=7860

CMD ["./start.sh"]