version: "3" services: nacos1: container_name: nacos-server hostname: nacos-server image: nacos/nacos-server:v2.1.0 environment: - MODE=standalone - PREFER_HOST_MODE=hostname - SPRING_DATASOURCE_PLATFORM=mysql - MYSQL_SERVICE_HOST=austin-mysql - MYSQL_SERVICE_PORT=3306 - MYSQL_SERVICE_USER=root - MYSQL_SERVICE_PASSWORD=root123_A - MYSQL_SERVICE_DB_NAME=nacos_config - JVM_XMS=128m - JVM_XMX=128m - JVM_XMN=128m volumes: - /home/nacos/single-logs/nacos-server:/home/nacos/logs - /home/nacos/init.d:/home/nacos/init.d ports: - 8848:8848 - 9848:9848 - 9849:9849 restart: on-failure