-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) · 722 Bytes
/
Dockerfile
File metadata and controls
28 lines (19 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Use an official Python runtime as a parent image
FROM python:3.11.13-slim-bullseye
LABEL maintainer="Psychevus"
LABEL description="Django WebSocket Chat App"
LABEL version="1.0"
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc libffi-dev libssl-dev \
default-libmysqlclient-dev && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies first to leverage Docker layer caching
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
WORKDIR /app/WebSocketChatApp
EXPOSE 8000
CMD ["daphne", "-b", "0.0.0.0", "-p", "8000", "WebSocketChatApp.asgi:application"]