-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdeploy-docker.sh
More file actions
executable file
·51 lines (43 loc) · 1.73 KB
/
deploy-docker.sh
File metadata and controls
executable file
·51 lines (43 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Deploy claude-code-gpt-5 Docker container
# This script pulls the Docker image from GHCR and runs it in the background
set -e
LITELLM_DOCKER_IMAGE="${LITELLM_DOCKER_IMAGE:-ghcr.io/teremterem/claude-code-gpt-5:latest}"
LITELLM_CONTAINER_NAME="${LITELLM_CONTAINER_NAME:-claude-code-gpt-5}"
LITELLM_PORT="${LITELLM_PORT:-4000}"
echo "🚀 Deploying Claude Code GPT-5 Proxy..."
# Stop and remove existing container if it exists
if docker ps -a --format 'table {{.Names}}' | grep -q "^${LITELLM_CONTAINER_NAME}$"; then
echo "📦 Stopping existing container..."
docker stop ${LITELLM_CONTAINER_NAME} || true
docker rm ${LITELLM_CONTAINER_NAME} || true
fi
# Pull the latest image
echo "⬇️ Pulling latest image from GHCR..."
docker pull ${LITELLM_DOCKER_IMAGE}
# Run the container
echo "▶️ Starting container..."
docker run -d \
--name ${LITELLM_CONTAINER_NAME} \
-p ${LITELLM_PORT}:4000 \
--env-file .env \
--restart unless-stopped \
${LITELLM_DOCKER_IMAGE}
echo "✅ Claude Code GPT-5 Proxy deployed successfully!"
echo "🔗 Proxy URL: http://localhost:${LITELLM_PORT}"
echo "📊 Health check: curl http://localhost:${LITELLM_PORT}/health"
echo ""
echo "📝 Usage with Claude Code:"
echo ""
echo " ANTHROPIC_BASE_URL=http://localhost:${LITELLM_PORT} claude"
echo ""
echo " OR"
echo ""
echo " ANTHROPIC_API_KEY=\"<LITELLM_MASTER_KEY>\" \\"
echo " ANTHROPIC_BASE_URL=http://localhost:${LITELLM_PORT} \\"
echo " claude"
echo ""
echo "❌ To stop and remove container: ./kill-docker.sh"
echo "🛑 To stop container: docker stop ${LITELLM_CONTAINER_NAME}"
echo "🗑️ To remove container: docker rm ${LITELLM_CONTAINER_NAME}"
echo "🔍 To view logs: docker logs -f ${LITELLM_CONTAINER_NAME}"