Cairn is a general-purpose AI state-space search engine, validated first on autonomous penetration testing. Sometimes misspelled as Carin.
Python aiai-agentai-cybersecurityai-hackerai-hackingblackbox-testingctfctf-toolsllmpenetration-testingpentestingred-teamingsecurity-automationsecurity-tools
feat: 添加 Docker Compose
leixiaofe95f862c37b
diff --git a/Dockerfile b/Dockerfilenew file mode 100644index 0000000..3463802--- /dev/null+++ b/Dockerfile@@ -0,0 +1,11 @@+FROM astral/uv:python3.13-trixie++COPY ./cairn/pyproject.toml /cairn/pyproject.toml+COPY ./cairn/uv.lock /cairn/uv.lock+WORKDIR /cairn+RUN uv sync --frozen --no-install-project -i https://mirrors.aliyun.com/pypi/simple/++COPY ./cairn /cairn+RUN uv sync --frozen -i https://mirrors.aliyun.com/pypi/simple/++ENV TZ=Asia/Shanghai\ No newline at end of filediff --git a/docker-compose.yaml b/docker-compose.yamlnew file mode 100644index 0000000..f49da56--- /dev/null+++ b/docker-compose.yaml@@ -0,0 +1,37 @@+services:+ cairn-server:+ build:+ context: .+ dockerfile: Dockerfile+ image: cairn-app+ container_name: cairn-server+ ports:+ - "8000:8000"+ volumes:+ - ./datas/cairn/:/root/.local/share/cairn/+ healthcheck:+ test:+ - "CMD"+ - "python"+ - "-c"+ - "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/projects', timeout=5)"+ interval: 10s+ timeout: 5s+ retries: 12+ start_period: 3s+ restart: unless-stopped+ command: ["uv", "run", "cairn", "serve", "--host", "0.0.0.0", "--no-access-log"]+ cairn-dispatcher:+ build:+ context: .+ dockerfile: Dockerfile+ image: cairn-app+ container_name: cairn-dispatcher+ volumes:+ - /var/run/docker.sock:/var/run/docker.sock+ - ./dispatch.yaml:/cairn/dispatch.yaml+ depends_on:+ cairn-server:+ condition: service_healthy+ restart: unless-stopped+ command: ["uv", "run", "cairn", "dispatch", "--config", "dispatch.yaml"]