# 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.27:3002 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.27:3002/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