version: '3.8'
services:
  sku-match-service:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: sku-match-service
    restart: always
    ports:
      - "8084:8084"
    environment:
      - SPRING_PROFILES_ACTIVE=prod
      - SPRING_DATASOURCE_URL=jdbc:mysql://111.229.80.149:3306/erp_db?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
      - SPRING_DATASOURCE_USERNAME=root
      - SPRING_DATASOURCE_PASSWORD=nihao588+
      - SPRING_DATA_REDIS_HOST=111.229.80.149
      - SPRING_DATA_REDIS_PORT=6379
      - SPRING_DATA_REDIS_PASSWORD=Y(@r5tGk9$Lp2
      - SPRING_CLOUD_NACOS_DISCOVERY_SERVER_ADDR=111.229.80.149:8848
      - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=111.229.80.149:8848
    healthcheck:
      test: ["CMD", "wget", "-q", "--spider", "http://localhost:8084/actuator/health"]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - erp-network

networks:
  erp-network:
    external: true
