update build

This commit is contained in:
mm644706215
2025-07-29 16:54:15 +08:00
parent 9bd77e991e
commit 3d95fc1359
4 changed files with 52 additions and 0 deletions

4
docker/.env.example Normal file
View File

@@ -0,0 +1,4 @@
HOST=0.0.0.0
PORT=9000
TRANSPORT=http
LOG_LEVEL=info

20
docker/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# syntax=docker/dockerfile:1
FROM debian:12-slim
WORKDIR /app
COPY . /app
ENV PATH="/root/.local/bin:$PATH"
# 使用 Here-docs 安装软件
RUN <<EOT
#!/bin/bash
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --managed-python -p 3.12 --seed /app/.venv
source /app/.venv/bin/activate
uv sync
uv pip install -e .
EOT
CMD ["bash", "-c", "/app/docker/start.sh"]

13
docker/docker-compose.yml Normal file
View File

@@ -0,0 +1,13 @@
services:
rustfs-s3-toolkit:
image: hotwa/rustfs-s3-toolkit:latest
build:
context: ..
dockerfile: docker/Dockerfile
container_name: rustfs-s3-toolkit
restart: always
command: tail -f /dev/null
volumes:
- ./data:/app/data
ports:
- "8004:9000"

15
docker/start.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# rustfs-s3-toolkit MCP Server Docker Start Script
set -e
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}🚀 rustfs-s3-toolkit MCP Server Starting...${NC}"
source .venv/bin/activate && python src/rustfs_s3_toolkit/mcp_server.py