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

79 lines
2.4 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默认是目录名但是如果你的系统中有同名的目录需要手动配置
# name: ulthon_admin
services:
ulthon_admin:
build:
context: ../../..
dockerfile: source/stack/docker-dev/Dockerfile
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- ../../..:/var/www/html
extra_hosts:
- "host.docker.internal:host-gateway"
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}
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:8.0
restart: unless-stopped
ports:
- "13306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ulthon
volumes:
- ../../../docker-dev-data/mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "16379:6379"
volumes:
- ../../../docker-dev-data/redis:/data
phpmyadmin:
image: phpmyadmin:latest
restart: unless-stopped
ports:
- "18888:80"
environment:
PMA_HOST: mysql
depends_on:
mysql:
condition: service_healthy
xhgui:
image: xhgui/xhgui:0.24.x
restart: unless-stopped
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}
depends_on:
mysql:
condition: service_healthy