From 62e72af93d0d8625ba21ba1dee21afe0bc90d485 Mon Sep 17 00:00:00 2001 From: augushong Date: Wed, 22 Jul 2026 01:10:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(stack):=20B=20=E8=B7=AF=E7=BA=BF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E4=B8=8A=E4=B8=8B=E6=96=87=E4=B8=8E=E5=8D=B7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=B9=E6=A1=88=EF=BC=88docker-serve/docker-dev/ful?= =?UTF-8?q?l=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 ++++- source/stack/docker-dev/docker-compose.yaml | 10 +++++----- source/stack/docker-serve/docker-compose.yaml | 6 +++--- source/stack/full/docker-compose.yaml | 6 +++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index e3882fe..c2bd6a1 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,7 @@ extend/base/common/command/curd/migrate_output.php /.playwright-mcp # PHPUnit 测试结果缓存 -tests/.phpunit.cache/ \ No newline at end of file +tests/.phpunit.cache/ + +# docker-dev 模式数据目录(B-route:位于 source/stack/docker-dev-data/) +docker-dev-data/ \ No newline at end of file diff --git a/source/stack/docker-dev/docker-compose.yaml b/source/stack/docker-dev/docker-compose.yaml index f49c162..f4d9228 100644 --- a/source/stack/docker-dev/docker-compose.yaml +++ b/source/stack/docker-dev/docker-compose.yaml @@ -5,13 +5,13 @@ services: ulthon_admin: build: - context: . - dockerfile: Dockerfile + context: ../.. + dockerfile: source/stack/docker-dev/Dockerfile restart: unless-stopped ports: - "8000:8000" volumes: - - ./:/var/www/html + - ../..:/var/www/html extra_hosts: - "host.docker.internal:host-gateway" depends_on: @@ -27,7 +27,7 @@ services: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: ulthon volumes: - - ./docker-dev/mysql:/var/lib/mysql + - ../../docker-dev-data/mysql:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 10s @@ -40,7 +40,7 @@ services: ports: - "16379:6379" volumes: - - ./docker-dev/redis:/data + - ../../docker-dev-data/redis:/data phpmyadmin: image: phpmyadmin:latest diff --git a/source/stack/docker-serve/docker-compose.yaml b/source/stack/docker-serve/docker-compose.yaml index 596b0fc..7b87392 100644 --- a/source/stack/docker-serve/docker-compose.yaml +++ b/source/stack/docker-serve/docker-compose.yaml @@ -7,13 +7,13 @@ services: # 正式环境中,您应当构建一个完整镜像,使用镜像名称或id运行,不要使用dockerfile # image: ulthon/ulthon_admin:v1 build: - context: . # Dockerfile 所在的目录 - dockerfile: Dockerfile # Dockerfile 的名称 + context: ../.. # 仓库根目录(B-route:从模式目录 cd 进来后指向根) + dockerfile: source/stack/docker-serve/Dockerfile # Dockerfile 的名称 restart: always ports: - "8000:8000" # HTTP volumes: - - ./:/var/www/html # 直接分发代码可以去掉注释并将下面的目录增加注释 + - ../..:/var/www/html # 直接分发代码可以去掉注释并将下面的目录增加注释 # - ./runtime:/var/www/html/runtime # - ./public/storage:/var/www/html/public/storage # - ./public/build:/var/www/html/public/build diff --git a/source/stack/full/docker-compose.yaml b/source/stack/full/docker-compose.yaml index 596b0fc..3cfe0c3 100644 --- a/source/stack/full/docker-compose.yaml +++ b/source/stack/full/docker-compose.yaml @@ -7,13 +7,13 @@ services: # 正式环境中,您应当构建一个完整镜像,使用镜像名称或id运行,不要使用dockerfile # image: ulthon/ulthon_admin:v1 build: - context: . # Dockerfile 所在的目录 - dockerfile: Dockerfile # Dockerfile 的名称 + context: ../.. # 仓库根目录(B-route:从模式目录 cd 进来后指向根) + dockerfile: source/stack/full/Dockerfile # Dockerfile 的名称 restart: always ports: - "8000:8000" # HTTP volumes: - - ./:/var/www/html # 直接分发代码可以去掉注释并将下面的目录增加注释 + - ../..:/var/www/html # 直接分发代码可以去掉注释并将下面的目录增加注释 # - ./runtime:/var/www/html/runtime # - ./public/storage:/var/www/html/public/storage # - ./public/build:/var/www/html/public/build