| FROM python:3.10-slim-buster |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| git \ |
| ffmpeg \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN git clone https://github.com/zoreu/mp3app.git . |
|
|
| |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN useradd -m appuser |
|
|
| |
| RUN mkdir -p /app/static /app/downloads |
|
|
| |
| RUN chown -R appuser:appuser /app /app/static /app/downloads |
| RUN chmod -R 755 /app /app/static /app/downloads |
|
|
| |
| USER appuser |
|
|
| EXPOSE 7860 |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"] |