Files
qiming/qiming-rcoder/docker/docker-compose.yml
2026-06-01 13:54:52 +08:00

98 lines
3.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: rcoder
services:
rcoder:
image: ${RCODER_IMAGE:-nuwax-docker-images-registry.cn-hangzhou.cr.aliyuncs.com/dev/master-rcoder:latest}
ports:
- "${RCODER_PORT:-8090}:${RCODER_PORT:-8090}"
- "8088:8088" # Pingora 反向代理端口VNC 代理、健康检查等)
- "60001:60000"
- "8199:80"
environment:
- TZ=Asia/Shanghai
- RCODER_PORT=${RCODER_PORT:-8090}
- RUST_LOG=debug # 设置调试日志级别
# 🎯 关键获取docker sock,用于检测宿主机路径
- DOCKER_SOCKET_PATH=${DOCKER_SOCKET_PATH:-/var/run/docker.sock}
volumes:
# 挂载 Docker socket
- ${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock
# 🎯 挂载本地测试配置文件(使用与主容器相同的镜像)
- ./config.yml:/app/config.yml
# 挂载项目工作目录 - 这是关键的挂载!
- ./project_workspace:/app/project_workspace
# 挂载 computer 项目工作目录
- ./computer-project-workspace:/app/computer-project-workspace
# 挂载工作目录
- ./logs/:/app/logs
# 挂载启动脚本
- ./start-rcoder.sh:/app/start-rcoder.sh
# 专门用于npm,pnpm,bun,uvx 缓存使用的目录
- ./computer-cache:/root/.cache
# 🖼️ 挂载壁纸目录(供 agent_runner 子容器使用)
# - ./wallpaper:/app/assets
command: ["/bin/bash", "/app/start-rcoder.sh"]
healthcheck:
test:
["CMD", "curl", "-f", "http://localhost:${RCODER_PORT:-8090}/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: always
# Pyroscope Server - 持续剖析数据存储和可视化
pyroscope:
image: grafana/pyroscope:latest
container_name: rcoder-pyroscope
ports:
- "4040:4040" # Web UI
environment:
- TZ=Asia/Shanghai
volumes:
- pyroscope-data:/data
command:
- server
restart: unless-stopped
# Prometheus Server - 时序数据库,存储常规指标
prometheus:
image: prom/prometheus:latest
container_name: rcoder-prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
- "--web.enable-lifecycle"
ports:
- "9091:9090" # 宿主机 9091 → 容器 9090避免端口冲突
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
environment:
- TZ=Asia/Shanghai
restart: unless-stopped
# Grafana - 可视化平台
grafana:
image: grafana/grafana:latest
container_name: rcoder-grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- TZ=Asia/Shanghai
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning:ro
depends_on:
- prometheus
restart: unless-stopped
volumes:
pyroscope-data:
prometheus-data:
grafana-data: