- 修正 RustFS 端点地址为 192.168.1.154:9000(对应服务器实际部署) - 移除 config.go 中硬编码的 AccessKey/SecretKey 默认值,改为环境变量传入 - 移除 middleware/auth.go 中硬编码的 API_KEY_VALUE 常量,改为参数注入 - 新增 Config.AuthAPIKey 字段,通过 AUTH_API_KEY 环境变量配置 - 移除 login.html 页面上的密钥格式提示,防止信息泄露 - docker-compose.yml 补全 RustFS 连接所需的环境变量 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
825 B
YAML
34 lines
825 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
file-system-server:
|
|
image: 192.168.1.154:31010/docker/file-system-server:latest
|
|
container_name: file-system-server
|
|
ports:
|
|
- "8080:8080"
|
|
restart: unless-stopped
|
|
environment:
|
|
- GIN_MODE=release
|
|
- RUSTFS_ENDPOINT_URL=http://192.168.1.154:9000
|
|
- RUSTFS_ACCESS_KEY_ID=rustfsadmin
|
|
- RUSTFS_SECRET_ACCESS_KEY=rustfsadmin123
|
|
- RUSTFS_REGION=us-east-1
|
|
- AUTH_API_KEY=rustfsadmin123
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/swagger/index.html"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
logs:
|
|
driver: local |