Files
ulthon_admin/source/stack/docker-serve/docker-compose.yaml

45 lines
1.9 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: ulthon_admin
services:
ulthon_admin:
# 正式环境中您应当构建一个完整镜像使用镜像名称或id运行不要使用dockerfile
# image: ulthon/ulthon_admin:v1
build:
context: ../../.. # 仓库根目录B-route从模式目录 cd 进来后指向根)
dockerfile: source/stack/docker-serve/Dockerfile # Dockerfile 的名称
restart: always
ports:
- "8000:8000" # HTTP
volumes:
- ../../..:/var/www/html # 直接分发代码可以去掉注释并将下面的目录增加注释
# - ./runtime:/var/www/html/runtime
# - ./public/storage:/var/www/html/public/storage
# - ./public/build:/var/www/html/public/build
# - ./storage:/var/www/html/storage
environment:
- XHPROF_ENABLE=${XHPROF_ENABLE:-false}
- XHPROF_SAVER=${XHPROF_SAVER:-file}
- XHPROF_FILE_DIR=${XHPROF_FILE_DIR:-}
- XHGUI_UPLOAD_URL=${XHGUI_UPLOAD_URL:-}
- XHGUI_UPLOAD_TOKEN=${XHGUI_UPLOAD_TOKEN:-ulthon-admin-xhprof}
extra_hosts:
- "host.docker.internal:host-gateway"
xhgui:
image: xhgui/xhgui:0.24.x
restart: always
profiles: ["xhgui"]
ports:
- "8142:80"
volumes:
# 挂载全局认证配置Basic Auth
- ../../../source/docker/xhgui-config.php:/var/www/xhgui/config/config.php
environment:
- XHGUI_UPLOAD_TOKEN=${XHGUI_UPLOAD_TOKEN:-ulthon-admin-xhprof}
# Basic Auth 认证(默认 admin/xhgui123通过 .env 或环境变量覆盖)
- XHGUI_AUTH_USER=${XHGUI_AUTH_USER:-admin}
- XHGUI_AUTH_PASS=${XHGUI_AUTH_PASS:-xhgui123}
# PDO 存储:需配置 XHGUI_PDO_DSN 指向 MySQLdocker-serve 无内置 MySQL