forked from deborahgu/soundcork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (17 loc) · 695 Bytes
/
Dockerfile
File metadata and controls
22 lines (17 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.12-slim
WORKDIR /app
# Install dependencies first (better layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY soundcork/ soundcork/
# The app imports "from soundcork.bmx import ..." so /app must be on PYTHONPATH
# The app reads bmx_services.json, swupdate.xml, and media/ from CWD
ENV PYTHONPATH=/app
WORKDIR /app/soundcork
# Gunicorn with uvicorn workers, bind to all interfaces
# Override log files to stdout/stderr for container logging
CMD ["gunicorn", "-c", "gunicorn_conf.py", "--bind", "0.0.0.0:8000", \
"--access-logfile", "-", "--error-logfile", "-", \
"--workers", "2", \
"main:app"]