This commit is contained in:
suvodip ghosh
2025-05-31 11:08:36 +00:00
parent 6bb4a49d74
commit 7c47f65494
18 changed files with 555 additions and 6 deletions

View File

@@ -1,10 +1,11 @@
FROM python:3.9-slim as base
FROM python:3.9-slim AS base
# Install dependencies
RUN apt-get update && apt-get install -y \
python3-pip \
ffmpeg \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install Python requirements
@@ -21,15 +22,15 @@ RUN wget https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip &&
COPY app.py .
# COPY Caddyfile .
FROM base as production
FROM base AS production
# Install gunicorn and eventlet
RUN pip install gunicorn eventlet
# Expose ports (8000 for app, 2019 for Caddy admin)
EXPOSE 8000 2019
EXPOSE 5000
CMD ["caddy", "run", "--config", "/app/Caddyfile"]
#CMD ["caddy", "run", "--config", "/app/Caddyfile"]
FROM base as development
FROM base AS development
# For development with auto-reload
CMD ["python", "app.py"]