docker-compose-sonic.yml文件:
version: '3' services: sonic-mysql: image: "mysql:5.7" hostname: sonic-mysql command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci environment: - MYSQL_ROOT_PASSWORD=Sonic!@#123 - MYSQL_DATABASE=sonic volumes: - ./mysql/data:/var/lib/mysql ports: - "3307:3306" networks: - sonic-network sonic-server-simple: image: "sonicorg/sonic-server-simple:v1.3.1-release" container_name: sonic-server-simple environment: - MYSQL_HOST=sonic-mysql - MYSQL_PORT=3306 - MYSQL_DATABASE=sonic - MYSQL_USERNAME=root - MYSQL_PASSWORD=Sonic!@#123 # (1)修改这里的ip - SONIC_API_HOST=xxx.xxx.xxx.xxx - SONIC_API_PORT=8094 - SONIC_NETTY_PORT=8095 - SECRET_KEY=sonic - EXPIRE_DAY=14 - CLIENT_HOST=http://localhost:3000 - FILE_KEEP_DAY=60 - RESULT_KEEP_DAY=60 - FILE_CRON=0 0 12 * * ? - RESULT_CRON=0 0 12 * * ? - DAY_CRON=0 0 10 * * ? - WEEK_CRON=0 0 10 ? * Mon networks: - sonic-network depends_on: - sonic-mysql volumes: - files:/keepFiles/ - files:/imageFiles/ - files:/recordFiles/ - files:/packageFiles/ - files:/logs/ ports: - "8094:8094" - "8095:8095" sonic-client-web: image: "sonicorg/sonic-client-web:v1.3.1-release" container_name: sonic-client-web environment: # (2)修改这里的ip - SONIC_API_HOST=XXX.XXX.XXX.XXX - SONIC_API_PORT=8094 depends_on: - sonic-mysql networks: - sonic-network ports: - "3000:80" volumes: files: networks: sonic-network: driver: bridge
标签:files,sonic,compose,SONIC,IP地址,MYSQL,server,mysql From: https://www.cnblogs.com/xiaoyanguniang/p/16989268.html