demo-app-web.yaml 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
version: "3.2"
services:
  demo-app-web:
    image: dstimage
    ports:
      - "51001:51001"
    networks:
      - agent_network
    #logging:
    #  driver: loki
    #  options:
    #    loki-url: "http://172.16.240.111:3100/loki/api/v1/push"
    #    max-size: "50m"
    #    max-file: "10"
    environment:
      - SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
      - SERVER_PORT=51001
      - SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
      - SPRING_CLOUD_NACOS_CONFIG_SERVER-ADDR=172.16.240.110:8848
      - SPRING_APPLICATION_NAME=demo-app-web
      - IBIZ_GATEWAY_PREFIX=demosys__web
      - IBIZ_GATEWAY_DEFAULTSERVICEID=demosys
      - IBIZ_GATEWAY_DEFAULTAPI=demoapi
      - NACOS=172.16.240.110:8848
      - SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
      - SEATA_ENABLED=true
    deploy:
      resources:
           limits:
               memory: 800M
           reservations:
               memory: 400M    
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        max_attempts: 3
        window: 120s
    volumes:
      - "nfs:/app/file"

volumes:
  nfs:
    driver: local
    driver_opts:
      type: "nfs"
      o: "addr=172.16.240.140,rw"
      device: ":/data/nfs"

networks:
  agent_network:
    driver: overlay
    attachable: true