mirror of
https://devops.lemonos.cn/lawson/FendxPHP.git
synced 2026-06-15 15:02:49 +08:00
- 创建用户表(users)包含基本信息和认证字段 - 创建角色表(roles)用于权限控制 - 创建权限表(permissions)定义系统权限 - 创建用户角色关联表(user_roles)建立用户与角色关系 - 创建角色权限关联表(role_permissions)建立角色与权限关系 - 创建迁移记录表(migrations)追踪数据库变更 - 添加AdminController提供管理员面板功能 - 实现系统监控、配置管理、缓存清理等功能 - 添加AOP切面编程支持的各种通知类型 - 实现告警管理AlertManager支持多渠道告警 - 添加文档注解接口规范
182 lines
4.1 KiB
YAML
182 lines
4.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.test
|
|
container_name: fendx-php-test
|
|
working_dir: /var/www/html
|
|
volumes:
|
|
- .:/var/www/html
|
|
- ./reports:/var/www/html/reports
|
|
environment:
|
|
- APP_ENV=testing
|
|
- DB_HOST=mysql-test
|
|
- DB_DATABASE=fendx_test
|
|
- DB_USERNAME=test
|
|
- DB_PASSWORD=test
|
|
- REDIS_HOST=redis-test
|
|
- CACHE_DRIVER=redis
|
|
- SESSION_DRIVER=redis
|
|
networks:
|
|
- test-network
|
|
depends_on:
|
|
mysql-test:
|
|
condition: service_healthy
|
|
redis-test:
|
|
condition: service_healthy
|
|
|
|
mysql-test:
|
|
image: mysql:8.0
|
|
container_name: fendx-mysql-test
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: root_test
|
|
MYSQL_DATABASE: fendx_test
|
|
MYSQL_USER: test
|
|
MYSQL_PASSWORD: test
|
|
volumes:
|
|
- mysql_test_data:/var/lib/mysql
|
|
- ./docker/mysql-test.cnf:/etc/mysql/conf.d/custom.cnf
|
|
ports:
|
|
- "3307:3306"
|
|
networks:
|
|
- test-network
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "test", "-ptest"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
redis-test:
|
|
image: redis:7-alpine
|
|
container_name: fendx-redis-test
|
|
restart: unless-stopped
|
|
command: redis-server --requirepass test_redis
|
|
volumes:
|
|
- redis_test_data:/data
|
|
ports:
|
|
- "6380:6379"
|
|
networks:
|
|
- test-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
nginx-test:
|
|
image: nginx:alpine
|
|
container_name: fendx-nginx-test
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:80"
|
|
volumes:
|
|
- .:/var/www/html
|
|
- ./docker/nginx-test.conf:/etc/nginx/nginx.conf
|
|
networks:
|
|
- test-network
|
|
depends_on:
|
|
- app
|
|
|
|
selenium-hub:
|
|
image: selenium/hub:4.8.1
|
|
container_name: fendx-selenium-hub
|
|
restart: unless-stopped
|
|
ports:
|
|
- "4444:4444"
|
|
networks:
|
|
- test-network
|
|
|
|
chrome:
|
|
image: selenium/node-chrome:4.8.1
|
|
container_name: fendx-chrome
|
|
restart: unless-stopped
|
|
environment:
|
|
- SE_EVENT_BUS_HOST=selenium-hub
|
|
- SE_EVENT_BUS_PUBLISH_PORT=4442
|
|
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
|
|
networks:
|
|
- test-network
|
|
depends_on:
|
|
- selenium-hub
|
|
|
|
firefox:
|
|
image: selenium/node-firefox:4.8.1
|
|
container_name: fendx-firefox
|
|
restart: unless-stopped
|
|
environment:
|
|
- SE_EVENT_BUS_HOST=selenium-hub
|
|
- SE_EVENT_BUS_PUBLISH_PORT=4442
|
|
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
|
|
networks:
|
|
- test-network
|
|
depends_on:
|
|
- selenium-hub
|
|
|
|
mailhog:
|
|
image: mailhog/mailhog:latest
|
|
container_name: fendx-mailhog
|
|
restart: unless-stopped
|
|
ports:
|
|
- "1025:1025" # SMTP
|
|
- "8025:8025" # Web UI
|
|
networks:
|
|
- test-network
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: fendx-minio
|
|
restart: unless-stopped
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
- MINIO_ROOT_USER=test
|
|
- MINIO_ROOT_PASSWORD=test123456
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
volumes:
|
|
- minio_test_data:/data
|
|
networks:
|
|
- test-network
|
|
|
|
elasticsearch-test:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
|
|
container_name: fendx-elasticsearch-test
|
|
restart: unless-stopped
|
|
environment:
|
|
- discovery.type=single-node
|
|
- xpack.security.enabled=false
|
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
|
ports:
|
|
- "9201:9200"
|
|
volumes:
|
|
- elasticsearch_test_data:/usr/share/elasticsearch/data
|
|
networks:
|
|
- test-network
|
|
|
|
kibana-test:
|
|
image: docker.elastic.co/kibana/kibana:8.8.0
|
|
container_name: fendx-kibana-test
|
|
restart: unless-stopped
|
|
environment:
|
|
- ELASTICSEARCH_HOSTS=http://elasticsearch-test:9200
|
|
ports:
|
|
- "5602:5601"
|
|
networks:
|
|
- test-network
|
|
depends_on:
|
|
- elasticsearch-test
|
|
|
|
volumes:
|
|
mysql_test_data:
|
|
redis_test_data:
|
|
minio_test_data:
|
|
elasticsearch_test_data:
|
|
|
|
networks:
|
|
test-network:
|
|
driver: bridge
|