阅读背景:

docker-compose搭建nacos单机版/集群版_TBC的博客_docker-compose nacos

来源:互联网 

单机版本

  1. docker-compose文件配置
version: "2"
services:
  nacos:
    image: nacos/nacos-server:latest
    container_name: nacos-standalone-mysql
    environment:
      - PREFER_HOST_MODE=hostname
      - MODE=standalone
      - SPRING_DATASOURCE_PLATFORM=mysql
      - MYSQL_MASTER_SERVICE_HOST=mysql-master
      - MYSQL_MASTER_SERVICE_DB_NAME=nacos_devtest
      - MYSQL_MASTER_SERVICE_PORT=3306
      - MYSQL_SLAVE_SERVICE_HOST=mysql-slave
      - MYSQL_SLAVE_SERVICE_PORT=3305
      - MYSQL_MASTER_SERVICE_USER=nacos
      - MYSQL_MASTER_SERVICE_PASSWORD=nacos
    volumes:
      - ./standalone-logs/:/home/nacos/logs
      - ./init.d/custom.properties:/home/nacos/init.d/custom.properties
    ports:
      - "8848:8848"
      - "9555:9555"
    depends_on:
      - mysql-slave
    restart: on-failure
versi



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: