update build
This commit is contained in:
4
docker/.env.example
Normal file
4
docker/.env.example
Normal file
@@ -0,0 +1,4 @@
|
||||
HOST=0.0.0.0
|
||||
PORT=9000
|
||||
TRANSPORT=http
|
||||
LOG_LEVEL=info
|
||||
20
docker/Dockerfile
Normal file
20
docker/Dockerfile
Normal 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
13
docker/docker-compose.yml
Normal 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
15
docker/start.sh
Normal 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
|
||||
Reference in New Issue
Block a user