services: postgres: image: postgres:18.3 container_name: k12study-dev-postgres restart: unless-stopped environment: POSTGRES_DB: ${K12STUDY_DB_NAME:-k12study} POSTGRES_USER: ${K12STUDY_DB_USER:-k12study} POSTGRES_PASSWORD: ${K12STUDY_DB_PASSWORD:-k12study} PGDATA: /var/lib/postgresql/18/docker TZ: ${TZ:-Asia/Shanghai} ports: - "${K12STUDY_DB_PORT:-5432}:5432" volumes: - ${K12STUDY_RUN_DIR:-./runtime}/postgres/pg18:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U ${K12STUDY_DB_USER:-k12study} -d ${K12STUDY_DB_NAME:-k12study}"] interval: 10s timeout: 5s retries: 10 networks: - k12study-dev-net redis: image: redis:7 container_name: k12study-dev-redis restart: unless-stopped command: redis-server --appendonly yes ports: - "${K12STUDY_REDIS_PORT:-6379}:6379" volumes: - ${K12STUDY_RUN_DIR:-./runtime}/redis/data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 10 networks: - k12study-dev-net nacos: image: nacos/nacos-server:v3.2.1-2026.04.03 container_name: k12study-dev-nacos restart: unless-stopped environment: MODE: standalone # --- 鉴权配置 --- NACOS_AUTH_ENABLE: "true" NACOS_AUTH_SYSTEM_TYPE: nacos NACOS_AUTH_TOKEN: ${NACOS_AUTH_TOKEN:-MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=} NACOS_AUTH_IDENTITY_KEY: ${NACOS_AUTH_IDENTITY_KEY:-serverIdentity} NACOS_AUTH_IDENTITY_VALUE: ${NACOS_AUTH_IDENTITY_VALUE:-security} NACOS_AUTH_CACHE_ENABLE: "true" NACOS_AUTH_ADMIN_ENABLE: "true" NACOS_AUTH_CONSOLE_ENABLE: "true" # Nacos 2.4+ / 3.x 不再提供默认管理员密码(不再是 nacos)。 # 首次开启鉴权后需初始化管理员密码,例如调用: # POST /nacos/v1/auth/users/admin with form-data: password=nacos TZ: ${TZ:-Asia/Shanghai} JVM_XMS: 256m JVM_XMX: 512m JVM_XMN: 128m ports: - "${K12STUDY_REGISTRY_CONSOLE_PORT:-9080}:8080" - "${K12STUDY_REGISTRY_PORT:-8848}:8848" - "${K12STUDY_REGISTRY_GRPC_PORT:-9848}:9848" - "${K12STUDY_REGISTRY_RAFT_PORT:-9849}:9849" volumes: - ${K12STUDY_RUN_DIR:-./runtime}/nacos/logs:/home/nacos/logs - ${K12STUDY_RUN_DIR:-./runtime}/nacos/data:/home/nacos/data networks: - k12study-dev-net nebula-metad: image: vesoft/nebula-metad:v3.8.0 container_name: k12study-dev-nebula-metad restart: unless-stopped command: - --meta_server_addrs=nebula-metad:9559 - --local_ip=nebula-metad - --ws_ip=0.0.0.0 - --port=9559 - --data_path=/data/meta ports: - "${K12STUDY_NEBULA_META_PORT:-9559}:9559" volumes: - ${K12STUDY_RUN_DIR:-./runtime}/nebula/meta:/data/meta networks: - k12study-dev-net nebula-storaged: image: vesoft/nebula-storaged:v3.8.0 container_name: k12study-dev-nebula-storaged restart: unless-stopped command: - --meta_server_addrs=nebula-metad:9559 - --local_ip=nebula-storaged - --ws_ip=0.0.0.0 - --port=9779 - --data_path=/data/storage depends_on: - nebula-metad ports: - "${K12STUDY_NEBULA_STORAGE_PORT:-9779}:9779" volumes: - ${K12STUDY_RUN_DIR:-./runtime}/nebula/storage:/data/storage networks: - k12study-dev-net nebula-graphd: image: vesoft/nebula-graphd:v3.8.0 container_name: k12study-dev-nebula-graphd restart: unless-stopped command: - --meta_server_addrs=nebula-metad:9559 - --local_ip=nebula-graphd - --ws_ip=0.0.0.0 - --port=9669 depends_on: - nebula-metad - nebula-storaged ports: - "${K12STUDY_GRAPH_PORT:-9669}:9669" networks: - k12study-dev-net nebula-studio: image: vesoft/nebula-graph-studio:latest ports: - "7001:7001" environment: - NGINX_PORT=7001 - LANG=en-US depends_on: - nebula-graphd networks: k12study-dev-net: name: ${K12STUDY_DOCKER_NET:-k12study-dev-net} driver: bridge