290aedf82d
Documentation: - OpenCode + LiteLLM integration guide - LiteLLM complete setup with 16 models - Gitea centralized configuration guide - Testing procedures and verification - API keys setup instructions Configurations: - OpenCode config pointing to LiteLLM - Updated LiteLLM config with all models - Nextcloud docker-compose template Scripts: - Gitea setup automation - OpenCode testing script Infrastructure: - Gitea: 192.168.88.200:3000 - LiteLLM: 192.168.88.27:4000 - Nextcloud: 192.168.88.62
88 lines
2.1 KiB
YAML
88 lines
2.1 KiB
YAML
# Nextcloud VM (192.168.88.62) - Updated docker-compose.yml
|
|
#
|
|
# This configuration pulls OpenCode config from centralized Gitea repository
|
|
# instead of managing per-VM configuration files
|
|
#
|
|
# Updated for centralized config management via http://192.168.88.200:3000
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# Keep existing Nextcloud service if present
|
|
# nextcloud:
|
|
# image: nextcloud:latest
|
|
# ... (existing config)
|
|
|
|
opencode:
|
|
image: opencode:latest
|
|
container_name: opencode
|
|
|
|
# Volumes for persistent configuration and workspace
|
|
volumes:
|
|
- opencode-config:/root/.opencode
|
|
- opencode-workspace:/workspace
|
|
|
|
# Expose port (adjust if needed)
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
# Environment variables
|
|
environment:
|
|
HOME: /root
|
|
# LiteLLM Gateway endpoint is in the config.json file
|
|
# pulled from Gitea
|
|
|
|
# The key: pull config from Gitea at startup
|
|
entrypoint: /bin/sh
|
|
command: |
|
|
-c "
|
|
echo '🔄 Fetching configuration from Gitea...'
|
|
mkdir -p /tmp/homelab-configs
|
|
|
|
# Clone the central configs repo
|
|
if git clone http://192.168.88.200:3000/jgitta/homelab-configs.git /tmp/homelab-configs; then
|
|
echo '✅ Configuration fetched successfully'
|
|
else
|
|
echo '⚠️ Could not fetch configs from Gitea, using defaults'
|
|
fi
|
|
|
|
# Set up OpenCode config directory
|
|
mkdir -p /root/.opencode
|
|
|
|
# Copy OpenCode config if available
|
|
if [ -f /tmp/homelab-configs/opencode/config.json ]; then
|
|
cp /tmp/homelab-configs/opencode/config.json /root/.opencode/config.json
|
|
echo '✅ OpenCode config loaded from Gitea'
|
|
else
|
|
echo '⚠️ Using default OpenCode configuration'
|
|
fi
|
|
|
|
# Start OpenCode
|
|
echo '🚀 Starting OpenCode...'
|
|
exec opencode
|
|
"
|
|
|
|
# Restart policy
|
|
restart: unless-stopped
|
|
|
|
# Resource limits (adjust as needed)
|
|
# deploy:
|
|
# resources:
|
|
# limits:
|
|
# cpus: '2'
|
|
# memory: 2G
|
|
# reservations:
|
|
# cpus: '1'
|
|
# memory: 1G
|
|
|
|
volumes:
|
|
opencode-config:
|
|
driver: local
|
|
|
|
opencode-workspace:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
driver: bridge
|