Docker Compose 配置生成器
基础配置
数据库
Hagicode 许可证配置
配置 Hagicode 软件许可证
Claude API 配置
统一使用 ANTHROPIC_AUTH_TOKEN 环境变量
API Endpoint 将自动设置为 ZAI API URL: https://open.bigmodel.cn/api/anthropic
卷挂载
工作目录是指向您需要编辑的代码仓库路径,将被映射到容器的 /app/workdir
生成的配置
# Hagicode Docker Compose 配置文件# 由 Docker Compose 生成器自动生成# 生成时间: 2026/1/22 10:18:22services:hagicode:image: newbe36524/hagicode:latestcontainer_name: hagicode-appenvironment:ASPNETCORE_ENVIRONMENT: ProductionASPNETCORE_URLS: http://+:45000TZ: Asia/ShanghaiConnectionStrings__Default: "Host=postgres;Port=5432;Database=hagicode;Username=postgres;Password=postgres"License__Activation__LicenseKey: "D76B5C-EC0A70-AEA453-BC9414-0A198D-V3"# ==================================================# Claude Code Configuration# All providers use ANTHROPIC_AUTH_TOKEN# ANTHROPIC_URL is set for ZAI and custom providers# ==================================================ports:- "45000:45000"volumes:- C:\\repos:/app/workdirdepends_on:postgres:condition: service_healthynetworks:- pcode-networkrestart: unless-stoppedpostgres:image: bitnami/postgresql:latestenvironment:POSTGRES_DATABASE: hagicodePOSTGRES_USER: postgresPOSTGRES_PASSWORD: postgresPOSTGRES_HOST_AUTH_METHOD: trustTZ: Asia/Shanghaivolumes:- postgres-data:/bitnami/postgresqlhealthcheck:test: ["CMD", "pg_isready", "-U", "postgres"]interval: 10stimeout: 3sretries: 3networks:- pcode-networkrestart: unless-stoppedvolumes:postgres-data:networks:pcode-network:driver: bridge