Working docker-compose.yaml added. Services start and work.

This commit is contained in:
2026-08-02 13:19:19 +05:00
parent cd3ce0337b
commit 6707a8e27e
12 changed files with 232 additions and 11 deletions
+54
View File
@@ -0,0 +1,54 @@
FROM python:3.13-slim
# Install FFmpeg and system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
ca-certificates \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set Python environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# ------------------------------------------------------------
# Copy and install Python dependencies
# ------------------------------------------------------------
COPY web/backend/requirements-web.txt .
RUN pip install --no-cache-dir -r requirements-web.txt
# ------------------------------------------------------------
# Copy the backend application code
# ------------------------------------------------------------
COPY web/backend /app/backend
# ------------------------------------------------------------
# Copy and install the audio_splitter package
# ------------------------------------------------------------
COPY audio_splitter /app/audio_splitter
COPY setup.py pyproject.toml README.md /app/
# Install audio_splitter as a package
RUN pip install --no-cache-dir /app
# ------------------------------------------------------------
# Create a non-root user
# ------------------------------------------------------------
RUN addgroup --system --gid 1000 appgroup && \
adduser --system --uid 1000 --ingroup appgroup appuser && \
chown -R appuser:appgroup /app
USER appuser
# ------------------------------------------------------------
# Expose port and start
# ------------------------------------------------------------
EXPOSE 8000
# PYTHONPATH is already /app by default because we set WORKDIR /app
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]