fix: keep bun, opencode coommand in env

This commit is contained in:
2025-12-25 17:27:28 +08:00
parent 35034f5e2d
commit b250a3693b
4 changed files with 16 additions and 3 deletions

View File

@@ -8,28 +8,34 @@ services:
# 将路径传递给 Dockerfile 阶段
CONTAINER_WORKSPACE: ${CONTAINER_WORKSPACE_PATH:-/workspace}
container_name: vibe-coding-env
hostname: vibe-coding
env_file: .env
environment:
# 让容器内部程序也能感知工作目录
- WORKSPACE=${CONTAINER_WORKSPACE_PATH:-/workspace}
- SHELL=/bin/zsh
- TERM=xterm-256color
ports:
- "${SSH_PORT:-2222}:22"
- "6300:3000"
- "6173-6175:5173-5175"
volumes:
- ${HOST_PROJECT_PATH:-.}:${CONTAINER_WORKSPACE_PATH:-/workspace}:cached
# 1. 使用命名卷持久化整个 .ssh 目录
- ssh-data:/root/.ssh
- ${SSH_PUB_KEY_PATH:-~/.ssh/id_ed25519.pub}:/tmp/host_id_ed25519.pub:ro
- cargo-cache:/usr/local/cargo/registry
- bun-cache:/root/.bun/install/cache
# --- 新增Zed 远程开发缓存 ---
- zed-server:/root/.zed
- zed-server:/root/.zed_server
- zed-share:/root/.local/share/zed
stdin_open: true
tty: true
restart: always
volumes:
ssh-data:
cargo-cache:
bun-cache:
zed-server: