opencode / start.sh
furqanahmadrao's picture
Create start.sh
e643d12 verified
raw
history blame contribute delete
446 Bytes
#!/usr/bin/env bash
set -e
echo "Starting OpenCode server..."
# OpenCode internal server (NO AUTH)
opencode serve \
--host 127.0.0.1 \
--port 3001 \
--no-auth \
&
# Give it a second
sleep 2
echo "Starting Portal..."
cd /app/portal
# Tell Portal where OpenCode lives
export OPENCODE_SERVER_URL=http://127.0.0.1:3001
# IMPORTANT: bind to 0.0.0.0 and HF port
export PORT=7860
export HOST=0.0.0.0
bun dev --port 7860 --hostname 0.0.0.0