Files
model-platform/docker-compose.yml

61 lines
1.7 KiB
YAML

version: '3.8'
services:
web:
image: nginx:alpine
ports:
- "8888:80"
restart: unless-stopped
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf:ro
- ./frontend/build/client:/usr/share/nginx/html:ro
depends_on:
- backend
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "8000:8000"
environment:
- RUNTIME_BASE_URL=http://runtime:8001
volumes:
- ./backend:/app/backend:ro
- ./common:/app/common:ro
depends_on:
- runtime
runtime:
build:
context: .
dockerfile: runtime/Dockerfile
cap_add:
- SYS_ADMIN
devices:
- /dev/fuse:/dev/fuse
security_opt:
- apparmor:unconfined
ports:
- "8001:8001"
environment:
- PUBLIC_BASE_URL=http://runtime
# --- Rclone 动态环境变量配置 (对应名称 rustfs) ---
- RCLONE_CONFIG_RUSTFS_TYPE=s3
- RCLONE_CONFIG_RUSTFS_PROVIDER=Other
- RCLONE_CONFIG_RUSTFS_ACCESS_KEY_ID=BdsXeamEnvSDQnk8tRxh
- RCLONE_CONFIG_RUSTFS_SECRET_ACCESS_KEY=mmBVc3RqzbT2VX3ysKGnirYH5kYD3ww3wFtMVvrb
# 替换为你的 RustFS 服务地址(如果是同 docker-compose 网络下的服务,可以直接填服务名:端口)
- RCLONE_CONFIG_RUSTFS_ENDPOINT=http://8.153.151.51:9000
# 自建 S3 建议强制开启 Path-style 访问 (http://endpoint/bucket)
- RCLONE_CONFIG_RUSTFS_ENV_AUTH=false
- RCLONE_CONFIG_RUSTFS_FORCE_PATH_STYLE=true
- RCLONE_CONFIG_RUSTFS_REGION=other
# --- Runtime 逻辑环境变量 ---
- REMOTE_BUCKET=rustfs:workspaces
- WORKSPACES_ROOT=/app/workspaces
volumes:
- ./runtime:/app/runtime:ro
- ./common:/app/common:ro