mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-08-30 12:45:32 +08:00
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
|
||
# 一般不需要配置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"
|
||
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
|
||
|
||
# Sync profile: Windows I/O optimization via rsync host->container
|
||
# Enable with: COMPOSE_PROFILES=sync docker compose up -d
|
||
# Note: ulthon_admin and ulthon_admin_sync both bind port 8000, do not run together.
|
||
ulthon_admin_sync:
|
||
profiles: ["sync"]
|
||
build:
|
||
context: ../../..
|
||
dockerfile: source/stack/docker-dev/Dockerfile
|
||
restart: unless-stopped
|
||
ports:
|
||
- "8000:8000"
|
||
volumes:
|
||
- ../../..:/var/www/source
|
||
environment:
|
||
- SYNC_INTERVAL=${SYNC_INTERVAL:-3}
|
||
extra_hosts:
|
||
- "host.docker.internal:host-gateway"
|
||
depends_on:
|
||
mysql:
|
||
condition: service_healthy
|