File size: 1,088 Bytes
40c2cab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# ---- Base system ----
RUN apt-get update && apt-get install -y --no-install-recommends \
  ca-certificates curl git bash jq \
  python3 python3-pip python3-venv \
  build-essential pkg-config \
  gnupg \
  && rm -rf /var/lib/apt/lists/*

# ---- Node 20 LTS (required) ----
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
  && apt-get update && apt-get install -y --no-install-recommends nodejs \
  && rm -rf /var/lib/apt/lists/*

RUN node -v && npm -v && python3 -V

# ---- App user ----
RUN useradd -m -u 1000 appuser
USER appuser
WORKDIR /home/appuser/app
ENV PATH="/home/appuser/.local/bin:${PATH}"

# ---- Python deps ----
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# ---- Node deps ----
COPY package.json .
RUN npm install --omit=dev

# ---- App code ----
COPY server.py .
COPY mcp.js .
COPY ui.html .
COPY start.sh .

RUN chmod +x start.sh

EXPOSE 7860

# ---- Single entrypoint (NO supervisor yet) ----
CMD ["./start.sh"]