You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
530 B
23 lines
530 B
# Dockerfile for Django + Daphne |
|
FROM python:3.11-slim |
|
|
|
WORKDIR /app |
|
|
|
# Install system dependencies |
|
RUN apt-get update && apt-get install -y build-essential libpq-dev && rm -rf /var/lib/apt/lists/* |
|
|
|
# Install Python dependencies |
|
COPY requirements.txt ./ |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
# Copy project files |
|
COPY . . |
|
|
|
# Collect static files |
|
RUN python manage.py collectstatic --noinput |
|
|
|
# Expose Daphne port |
|
EXPOSE 8003 |
|
|
|
# Start Daphne |
|
CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "crossapp.asgi:application"]
|
|
|