api / Dockerfile
y4shg's picture
Update Dockerfile
3d8996e verified
Raw
History Blame Contribute Delete
955 Bytes
FROM node:lts-slim
# 1. Install build tools for native addons (python3, make, g++) AND your sync tools (git, bash)
# Doing this before npm install ensures node-gyp can find Python if needed during the initial install.
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
git \
bash \
&& rm -rf /var/lib/apt/lists/*
# 2. Install global dependencies: omniroute, qodercli, and cline
RUN npm install -g omniroute @qoder-ai/qodercli cline
# 3. Rebuild native addons against the current Node version in the package root (removed '/app')
RUN cd /usr/local/lib/node_modules/omniroute && npm rebuild better-sqlite3
# 4. Install zod inside omniroute's directory where Turbopack can find it (removed '/app')
RUN cd /usr/local/lib/node_modules/omniroute && npm install zod --legacy-peer-deps
COPY sync.sh /sync.sh
RUN chmod +x /sync.sh
ENV PORT=7860
EXPOSE 7860
CMD ["/bin/bash", "-c", "/sync.sh && omniroute --port 7860"]