forked from johnpooch/diplicity-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (34 loc) · 1.1 KB
/
Copy pathDockerfile
File metadata and controls
45 lines (34 loc) · 1.1 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
# 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.15.0-bullseye-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
RUN pip install --no-cache-dir -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"]