-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (38 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
49 lines (38 loc) · 1.41 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
# This Dockerfile is specifically for the codegen service.
# It includes both frontend (Node.js) and backend (Python) dependencies.
# Base image with Node.js and Python
FROM node:24.16.0-bookworm-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
build-essential \
libpq-dev \
git \
bash \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install global npm packages
RUN npm install -g npm@latest
# Set working directory
WORKDIR /app
# Copy Python configuration files
COPY ./service/requirements.txt ./service/dev_requirements.txt ./service/pyproject.toml /app/
# Install Python dependencies.
# `node:24.15.0-bookworm-slim` ships a PEP 668 "externally-managed" Python, so
# system pip refuses installs without an explicit override. This is a single-purpose
# ephemeral container that runs spectacular + orval and exits, so installing into
# the system Python is fine — no venv required.
RUN pip install --no-cache-dir --break-system-packages -r requirements.txt -r dev_requirements.txt
# Install Node.js dependencies
COPY ./packages/web/package.json ./packages/web/package-lock.json /app/packages/web/
WORKDIR /app/packages/web
RUN npm install
WORKDIR /app
# Expose ports for React (5173) and Django (8000)
EXPOSE 5173 8000
# Default command
CMD ["bash"]