Files
my-opencode-config/start-dev-container-joint.bash
T
2026-05-28 14:33:25 +08:00

42 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -e
[ ! -f .env ] || export $(grep -v '^#' .env | xargs)
WORKDIR=~/git/git.cleverthis.com/
CONTAINER_NAME=cleverthis-dev-joint
docker stop "$CONTAINER_NAME" || true
docker rm -f "$CONTAINER_NAME" || true
docker run -it --rm \
--network=host \
--name "$CONTAINER_NAME" \
--user $(id -u):$(id -g) \
--group-add 969 \
--volume "${WORKDIR}:/app:z" \
--volume "/home/skyblond/opencode/90-rui-init.sh:/docker-entrypoint.d/90-rui-init.sh" \
--volume "/home/skyblond/cleverthis/cleverrouter/workspace:/workspace" \
--volume "/home/skyblond/opencode/agents:/home/devuser/.config/opencode/agents" \
--volume "/home/skyblond/opencode/skills:/home/devuser/.config/opencode/skills" \
--volume "/home/skyblond/opencode/opencode.json:/home/devuser/.config/opencode/opencode.json" \
--volume "/home/skyblond/opencode/opencode-data:/home/devuser/.local/share/opencode/" \
--volume "/home/skyblond/opencode/scripts:/external/opencode/scripts" \
--volume "/var/run/docker.sock:/var/run/docker.sock" \
--env "OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
--env "OPENAI_API_KEY=${OPENAI_API_KEY}" \
--env "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}" \
--env "GOOGLE_API_KEY=${GOOGLE_API_KEY}" \
--env "GEMINI_API_KEY=${GEMINI_API_KEY}" \
--env "HF_TOKEN=${HF_TOKEN}" \
--env "FORGEJO_PAT=${FORGEJO_PAT}" \
cleverrouter-dev zsh -c "/home/devuser/.opencode/bin/opencode"
# anthropic/claude-opus-4.6
# openrouter/anthropic/claude-opus-4.6
# openai/gpt-5.3-codex
# server: opencode serve --hostname 0.0.0.0 --print-logs --log-level WARN
# tui: opencode -m anthropic/claude-opus-4.6