# CodeCraft – copy .env.example to .env and adjust, then: docker compose up -d --build services: codecraft: build: . image: codecraft:latest container_name: codecraft restart: unless-stopped # Same UID/GID as the owner of your project files. user: "${UID:-1000}:${GID:-1000}" ports: - "${PORT:-8787}:8787" environment: CODECRAFT_TOKEN: ${CODECRAFT_TOKEN:?set CODECRAFT_TOKEN in .env} ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-} GEMINI_API_KEY: ${GEMINI_API_KEY:-} OPENCODE_API_KEY: ${OPENCODE_API_KEY:-} FAL_KEY: ${FAL_KEY:-} OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-} volumes: # Config (config.toml), SQLite database, agent home directory. - ./data:/data # The projects the agents may work on. - ${WORKSPACE:-./workspace}:/workspace # Reach self-hosted models (Ollama, vLLM, ...) on the host. extra_hosts: - "host.docker.internal:host-gateway" shm_size: "1gb" # Chromium (craft mode)