-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 703 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 703 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
# Pull official base image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install system dependencies (needed for Postgres and Celery)
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc libpq-dev netcat-openbsd \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy project
COPY . .
# Run the application
# (This command is overridden by docker-compose, but good as a default)
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]