-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
30 lines (22 loc) · 739 Bytes
/
Dockerfile.dev
File metadata and controls
30 lines (22 loc) · 739 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
28
29
30
# Development Dockerfile with hot-reloading support
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies (including PostgreSQL client for psycopg2)
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install additional dev dependencies
RUN pip install --no-cache-dir watchdog
# Copy application code (will be overridden by volume mount in dev)
COPY . .
# Create instance directory
RUN mkdir -p /app/instance
# Default port (can be overridden via .env)
ENV PORT=1994
EXPOSE ${PORT}
# Run Flask dev server with hot reload
CMD ["python", "app.py"]