File size: 751 Bytes
7d4fc93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM node:23-bookworm

# Install system dependencies
RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    git \
    build-essential \
    python-is-python3 \
    && rm -rf /var/lib/apt/lists/*

# Install yarn and pm2 globally
RUN npm install -g yarn pm2

# Set environment variables
ENV PATH="${PATH}:/usr/local/bin"
ENV PM2_HOME=/tmp/.pm2
ENV NPM_CONFIG_CACHE=/tmp/npm_cache
ENV YARN_CACHE_FOLDER=/tmp/yarn_cache
ENV NODE_ENV=production
ENV NODE_OPTIONS=--max-old-space-size=512

# Create app directory
WORKDIR /app

# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the files
COPY . .

# Start script
CMD ["python3", "app.py"]