-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
63 lines (52 loc) · 2.04 KB
/
Copy pathDockerfile.dev
File metadata and controls
63 lines (52 loc) · 2.04 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
########################################
# BASE — Development image
########################################
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
NODE_ENV=development
# ----------------------------------------------------
# Install full dev toolchain (for mysqlclient, lxml, etc.)
# ----------------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
curl git build-essential gcc g++ make \
pkg-config \
libxml2-dev libxslt-dev \
zlib1g-dev \
libffi-dev libssl-dev \
default-libmysqlclient-dev \
openssh-client \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# ----------------------------------------------------
# Install Node.js (latest LTS 24.x)
# ----------------------------------------------------
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# PM2 for running multiple crawlers
RUN npm install -g pm2
# ----------------------------------------------------
# Install Python tooling
# ----------------------------------------------------
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir poetry
WORKDIR /app
# ----------------------------------------------------
# Copy dependency metadata first (layer cache)
# ----------------------------------------------------
COPY pyproject.toml poetry.lock* ./
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
# ----------------------------------------------------
# Copy full project
# ----------------------------------------------------
COPY . .
# ----------------------------------------------------
# Expose common dev ports
# ----------------------------------------------------
EXPOSE 3000 8000 9229
# ----------------------------------------------------
# DEV MODE: Keep container alive forever
# ----------------------------------------------------
CMD ["sleep", "infinity"]