godmod3-api / Dockerfile
pliny-the-prompter's picture
Upload 22 files
c78c312 verified
raw
history blame contribute delete
959 Bytes
# G0DM0D3 Research Preview API
# Deploy on Hugging Face Spaces (Docker SDK) or any container host.
#
# Build: docker build -t g0dm0d3-api .
# Run: docker run -p 7860:7860 \
# -e OPENROUTER_API_KEY=sk-or-... \
# -e GODMODE_API_KEY=your-secret-key \
# g0dm0d3-api
#
# OPENROUTER_API_KEY: Your OpenRouter key (powers all model calls)
# GODMODE_API_KEY: Auth key callers must send as Bearer token
FROM node:20-slim
WORKDIR /app
# Copy package files and install deps
COPY package.json package-lock.json* ./
RUN npm ci --omit=dev 2>/dev/null || npm install --omit=dev
# Copy source (api + engine libs)
COPY api/ ./api/
COPY src/lib/ ./src/lib/
COPY src/stm/ ./src/stm/
# HF Spaces expects port 7860
ENV PORT=7860
EXPOSE 7860
# Health check for container orchestrators
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
CMD curl -f http://localhost:7860/v1/health || exit 1
CMD ["npx", "tsx", "api/server.ts"]