-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
47 lines (36 loc) · 982 Bytes
/
Dockerfile.dev
File metadata and controls
47 lines (36 loc) · 982 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Development Dockerfile with hot reloading
FROM node:20-alpine AS base
# Install system dependencies
RUN apk update && apk add --no-cache \
git \
curl \
python3 \
py3-pip \
python3-dev \
build-base \
&& rm -rf /var/cache/apk/*
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --legacy-peer-deps
# Development stage
FROM base AS development
# Create Python virtual environment
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Install Python development dependencies
RUN pip install --upgrade pip && \
pip install pytest black pylint flake8 mypy
# Copy source code (will be overridden by volume in docker-compose)
COPY . .
# Set environment variables for development
ENV NODE_ENV=development
ENV NEXT_TELEMETRY_DISABLED=1
ENV WATCHPACK_POLLING=true
ENV CHOKIDAR_USEPOLLING=true
# Expose ports
EXPOSE 3000 9229
# Development command with hot reloading
CMD ["npm", "run", "dev"]