version: '3'
services:
sonic-mysql:
image: "mysql:5.7"
container_name: sonic-mysql
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
environment:
- MYSQL_ROOT_PASSWORD=Sonic!@#123
- MYSQL_DATABASE=sonic
volumes:
- ./mysql/data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- sonic-network
sonic-server-eureka:
image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-server-eureka:v1.4.1-beta"
hostname: sonic-server-eureka
environment:
- SONIC_EUREKA_USERNAME
- SONIC_EUREKA_PASSWORD
- SONIC_EUREKA_PORT
- SONIC_EUREKA_HOST=sonic-server-eureka
volumes:
- ./logs/:/logs/
depends_on:
- sonic-mysql
networks:
- sonic-network
ports:
- "${SONIC_EUREKA_PORT}:${SONIC_EUREKA_PORT}"
sonic-server-gateway:
image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-server-gateway:v1.4.1-beta"
hostname: sonic-server-gateway
environment:
- SONIC_EUREKA_USERNAME
- SONIC_EUREKA_PASSWORD
- SONIC_EUREKA_PORT
- SONIC_EUREKA_HOST=sonic-server-eureka
- SECRET_KEY
- EXPIRE_DAY
volumes:
- ./logs/:/logs/
depends_on:
- sonic-mysql
- sonic-server-eureka
networks:
- sonic-network
restart: on-failure
sonic-server-controller:
image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-server-controller:v1.4.1-beta"
environment:
- SONIC_EUREKA_USERNAME
- SONIC_EUREKA_PASSWORD
- SONIC_EUREKA_PORT
- SONIC_EUREKA_HOST=sonic-server-eureka
- MYSQL_HOST
- MYSQL_PORT
- MYSQL_DATABASE
- MYSQL_USERNAME
- MYSQL_PASSWORD
- SERVER_HOST
- SERVER_PORT
- SECRET_KEY
- EXPIRE_DAY
- REGISTER_ENABLE
- NORMAL_USER_ENABLE
- LDAP_USER_ENABLE
- LDAP_USER_ID
- LDAP_BASE_DN
- LDAP_BASE
- LDAP_USERNAME
- LDAP_PASSWORD
- LDAP_URL
networks:
- sonic-network
volumes:
- ./logs/:/logs/
depends_on:
- sonic-mysql
- sonic-server-eureka
restart: on-failure
sonic-server-folder:
image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-server-folder:v1.4.1-beta"
environment:
- SONIC_EUREKA_USERNAME
- SONIC_EUREKA_PASSWORD
- SONIC_EUREKA_HOST=sonic-server-eureka
- SONIC_EUREKA_PORT
- SERVER_HOST
- SERVER_PORT
- SECRET_KEY
- EXPIRE_DAY
networks:
- sonic-network
volumes:
- ./keepFiles/:/keepFiles/
- ./imageFiles/:/imageFiles/
- ./recordFiles/:/recordFiles/
- ./packageFiles/:/packageFiles/
- ./logs/:/logs/
depends_on:
- sonic-mysql
- sonic-server-eureka
restart: on-failure
sonic-client-web:
image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-client-web:v1.4.1-beta"
environment:
- SERVER_HOST
- SERVER_PORT
networks:
- sonic-network
depends_on:
- sonic-mysql
- sonic-server-gateway
restart: on-failure
ports:
- "${SERVER_PORT}:80"
networks:
sonic-network:
driver: bridge
################################################
# Do you need any help? #
# Visit https://sonic-cloud.gitee.io/#/Deploy #
################################################
##################
# Service Config #
##################
SERVER_HOST=你的linux的IP地址
SERVER_PORT=3000
SONIC_EUREKA_USERNAME=sonic
SONIC_EUREKA_PASSWORD=sonic
SONIC_EUREKA_PORT=9090
################
# MySQL Config #
################
MYSQL_HOST=你的linux的IP地址
MYSQL_PORT=3306
MYSQL_DATABASE=sonic
MYSQL_USERNAME=root
MYSQL_PASSWORD=Sonic!@#123
################
# User Config #
################
SECRET_KEY=sonic
EXPIRE_DAY=14
PERMISSION_ENABLE=true
PERMISSION_SUPER_ADMIN=sonic
REGISTER_ENABLE=true
NORMAL_USER_ENABLE=true
LDAP_USER_ENABLE=false
LDAP_USER_ID=cn
LDAP_BASE_DN=ou=users
LDAP_BASE=ou=system
LDAP_USERNAME=uid=admin,ou=system
LDAP_PASSWORD=Sonic!@#123
LDAP_URL=ldap://你的linux的IP地址:10389
https://tfjiao.blog.csdn.net/article/details/116905608
docker-compose -f docker-compose-sonic-1.4.1.yml up -d
失败的话,删除启动的容器:
docker-compose -f docker-compose-sonic-1.4.1.yml down
1、环境部署:https://tfjiao.blog.csdn.net/article/details/123212518
2、配置1.4.1的 agent:
sonic:
agent:
host: 你本地电脑的IP
port: 7777
# 替换为 sonic网页 前端 新增Agent 生成的key
key: 你在sonic上新增的key
server:
# 改成server的SERVER_HOST
host: 你部署linux的IP
# 改成server的SERVER_PORT
port: 3000
modules:
android:
# 是否开启安卓模块
enable: true
# 是否开启远程adb调试功能
use-adbkit: true
ios:
# 如果不需要连接iOS设备,请将true改为false。开启的windows用户请确保本机已安装iTunes
enable: false
# 替换为你自己使用的wda的bundleId,如果没有.xctrunner后缀会自动补全,建议使用公司的开发者证书
wda-bundle-id: com.sonic.WebDriverAgentRunner.xctrunner
appium:
# 是否开启Appium功能
enable: true
webview:
# 是否开启在线webView调试功能
enable: true
# 谷歌调试端口,一般不需要修改(默认0使用随机端口,如果需要开启防火墙给外部使用,请设置固定端口如7778)
chrome-driver-debug-port: 0
# 替换为Agent机器上的chrome浏览器的driver路径,可以去http://npm.taobao.org/mirrors/chromedriver/下载
chrome-driver-path: 你谷歌浏览器驱动的路径
sgm:
enable: true
key在哪里呢?
java -jar sonic_xxx.jar