File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Use Node.js LTS
2- FROM node:20-slim
1+ # Hybrid Node.js + Python Dockerfile for Railway (grantgoblin)
2+ FROM python:3.11-slim-bookworm
3+
4+ # 1. Install System Dependencies & Node.js
5+ RUN apt-get update && apt-get install -y \
6+ curl \
7+ git \
8+ build-essential \
9+ && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
10+ && apt-get install -y nodejs \
11+ && apt-get clean \
12+ && rm -rf /var/lib/apt/lists/*
313
4- # Set working directory
514WORKDIR /app
615
7- # Copy package files
8- COPY package*.json ./
16+ # 2. Python Setup (Heavy dependencies)
17+ # Copy strict requirements or just the researcher one
18+ COPY ai-researcher/requirements.txt ./requirements.txt
19+ RUN pip install --no-cache-dir -r requirements.txt
920
10- # Install dependencies
21+ # 3. Node.js Setup
22+ COPY package.json package-lock.json* ./
1123RUN npm ci --only=production
1224
13- # Copy source code
25+ # 4. Copy Application Source
1426COPY . .
1527
16- # Expose port
17- EXPOSE 3000
18-
19- # Set environment variables
28+ # 5. Environment & Startup
2029ENV NODE_ENV=production
21- ENV PORT=3000
30+ ENV PYTHONUNBUFFERED=1
31+ EXPOSE 3000
2232
23- # Start the server
33+ # Start Express Server (which spawns Python scripts)
2434CMD ["npm" , "start" ]
You can’t perform that action at this time.
0 commit comments