version: '3' services: nacos: image: registry.cn-hangzhou.aliyuncs.com/72crm/nacos:1.2.1 container_name: nacos environment: SPRING_DATASOURCE_PLATFORM: mysql MYSQL_SERVICE_HOST: 47.103.60.8 # 替换为你的 MySQL 主机地址 MYSQL_SERVICE_PORT: 3306 # 替换为你的 MySQL 端口,默认为 3306 MYSQL_SERVICE_USER: root # 替换为你的 MySQL 用户名 MYSQL_SERVICE_PASSWORD: password # 替换为你的 MySQL 密码 MYSQL_SERVICE_DB_NAME: nacos # 替换为你的数据库名称 PREFER_HOST_MODE: hostname volumes: - ./conf:/home/nacos/conf - ./log:/home/nacos/logs - ./nacos.sh:/nacos.sh entrypoint: /nacos.sh -c 'echo "start web service here"' ports: - "8848:8848" restart: always networks: - nacos-network networks: nacos-network: driver: bridge