mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
8c26e30fba
Each starter gets a Dockerfile, entrypoint.sh, and .dockerignore. Docker-specific adaptations only — original code untouched: - HOSTNAME=0.0.0.0 for Next.js standalone - PORT override for Python agents (Railway sets PORT=3000) - uv sync --frozen for exact dep resolution from lockfiles - serve.py + docker-route-override.ts for LangGraph starters (langgraph-cli dev needs Docker-in-Docker, unavailable on Railway) - next.config.ts: ignoreBuildErrors for HttpAgent type mismatch - Mastra: workingMemory scope: thread for standalone deploy - CVE fix: patch package.json to next@15.3.8 at deploy time
18 lines
435 B
Bash
Executable File
18 lines
435 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Start Python agent on port 8000 (override PORT which Railway sets to 3000)
|
|
cd /app/agent
|
|
AGENT_PORT=8000 PORT=8000 /app/agent/.venv/bin/python -m uvicorn main:app --host 0.0.0.0 --port 8000 &
|
|
AGENT_PID=$!
|
|
cd /app
|
|
|
|
# Start Next.js frontend
|
|
PORT=${PORT:-3000} npx next start --port ${PORT:-3000} &
|
|
NEXT_PID=$!
|
|
|
|
wait -n $AGENT_PID $NEXT_PID
|
|
EXIT_CODE=$?
|
|
kill $AGENT_PID $NEXT_PID 2>/dev/null || true
|
|
exit $EXIT_CODE
|