version: "3.8"
services:
  nacos:
    image: nacos/nacos-server:v2.3.2
    container_name: ea_nacos2
    env_file:
      - ./env/nacos-standlone-mysql.env
    volumes:
      - ./data/standalone-logs/:/home/nacos/logs
      - ./init.d/application.properties:/home/nacos/conf/application.properties
    ports:
      - "8848:8848"
      - "9848:9848"
      - "9849:9849"
    depends_on:
      - mysql
    restart: always
    networks:
      - ea_net
    deploy:
      resources:
        limits:
          cpus: "1"
          memory: 2G
        reservations:
          cpus: "0.25"
          memory: 100M
  mysql:
    container_name: ea_nacos2_mysql
    image: nacos/nacos-mysql:5.7
    env_file:
      - ./env/mysql.env
    volumes:
      - ./data/mysql:/var/lib/mysql
    ports:
      - "13306:3306"
    restart: always
    networks:
      - ea_net

networks:
  ea_net:
    external: true
