Files
K12Study/.devcontainer/external/docker-compose.yml

44 lines
1.9 KiB
YAML
Raw Normal View History

2026-04-14 16:27:47 +08:00
services:
workspace:
image: mcr.microsoft.com/devcontainers/universal:2
volumes:
- ../../:/workspaces/K12study:cached
2026-04-20 13:28:47 +08:00
- frontend-node-modules:/workspaces/K12study/frontend/node_modules
- pnpm-store:/pnpm-store
2026-04-14 16:27:47 +08:00
working_dir: /workspaces/K12study
command: sleep infinity
2026-04-20 13:28:47 +08:00
user: 1000:1000 # 👈 强制权限,最关键
2026-04-14 16:27:47 +08:00
environment:
2026-04-20 13:28:47 +08:00
NPM_CONFIG_USER: 1000
PNPM_HOME: /pnpm-store
PNPM_STORE_DIR: /pnpm-store
# 你原来的所有环境变量...
2026-04-14 16:27:47 +08:00
K12STUDY_DB_HOST: ${K12STUDY_DB_HOST:-host.docker.internal}
K12STUDY_DB_PORT: ${K12STUDY_DB_PORT:-5432}
K12STUDY_DB_NAME: ${K12STUDY_DB_NAME:-k12study}
K12STUDY_DB_USER: ${K12STUDY_DB_USER:-k12study}
K12STUDY_DB_PASSWORD: ${K12STUDY_DB_PASSWORD:-k12study}
K12STUDY_REDIS_HOST: ${K12STUDY_REDIS_HOST:-host.docker.internal}
K12STUDY_REDIS_PORT: ${K12STUDY_REDIS_PORT:-6379}
K12STUDY_REDIS_PASSWORD: ${K12STUDY_REDIS_PASSWORD:-}
2026-04-14 18:14:41 +08:00
K12STUDY_REGISTRY_HOST: ${K12STUDY_REGISTRY_HOST:-host.docker.internal}
K12STUDY_REGISTRY_PORT: ${K12STUDY_REGISTRY_PORT:-8848}
K12STUDY_REGISTRY_GRPC_PORT: ${K12STUDY_REGISTRY_GRPC_PORT:-9848}
K12STUDY_REGISTRY_RAFT_PORT: ${K12STUDY_REGISTRY_RAFT_PORT:-9849}
2026-04-16 15:46:29 +08:00
K12STUDY_GRAPH_HOST: ${K12STUDY_GRAPH_HOST:-host.docker.internal}
K12STUDY_GRAPH_PORT: ${K12STUDY_GRAPH_PORT:-9669}
K12STUDY_GRAPH_USER: ${K12STUDY_GRAPH_USER:-root}
K12STUDY_GRAPH_PASSWORD: ${K12STUDY_GRAPH_PASSWORD:-nebula}
K12STUDY_VECTOR_HOST: ${K12STUDY_VECTOR_HOST:-host.docker.internal}
K12STUDY_VECTOR_PORT: ${K12STUDY_VECTOR_PORT:-19530}
K12STUDY_VECTOR_HTTP_PORT: ${K12STUDY_VECTOR_HTTP_PORT:-9091}
2026-04-20 10:39:36 +08:00
K12STUDY_ATTU_HOST: ${K12STUDY_ATTU_HOST:-host.docker.internal}
K12STUDY_ATTU_PORT: ${K12STUDY_ATTU_PORT:-3000}
2026-04-14 16:27:47 +08:00
PYTHONUNBUFFERED: "1"
extra_hosts:
- "host.docker.internal:host-gateway"
2026-04-20 13:28:47 +08:00
volumes:
frontend-node-modules:
pnpm-store: