Update Dockerfile for python
Build Institutional Trader / build-and-deploy (push) Has been cancelled
Details
Build Institutional Trader / build-and-deploy (push) Has been cancelled
Details
This commit is contained in:
parent
5241f18052
commit
03a7e73b37
|
|
@ -10,6 +10,12 @@ RUN npm run build
|
|||
FROM node:18-alpine
|
||||
WORKDIR /app/backend
|
||||
|
||||
# Install python and build dependencies
|
||||
RUN apk add --no-cache python3 py3-pip python3-dev build-base && \
|
||||
python3 -m venv /opt/venv
|
||||
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# Install backend dependencies
|
||||
COPY backend/package*.json ./
|
||||
RUN npm install --production
|
||||
|
|
@ -17,6 +23,9 @@ RUN npm install --production
|
|||
# Copy backend source
|
||||
COPY backend/ ./
|
||||
|
||||
# Install python dependencies
|
||||
RUN pip install --no-cache-dir -r python_service/requirements.txt
|
||||
|
||||
# Copy built frontend to the public directory expected by server.js
|
||||
# (__dirname is /app/backend/src, so ../../public is /app/public)
|
||||
COPY --from=frontend-build /app/frontend/dist /app/public
|
||||
|
|
|
|||
Loading…
Reference in New Issue