
version: '3.6'

services:

  middle-proxy:
    image: 313.co.kr:5550/313devgrp/java-service-tree-framework-middle-proxy:24.11.1
    ports:
      - 13131:13131
    environment:
      ARMS_BASE_ADDR: http://www.313.co.kr
      SLACK_TOKEN: xoxb-6506875664277-6522692878945-oPqPDaebTVqUNHQfoIokVc9y
      SPRING_PROFILES_ACTIVE: stg # 여기에 원하는 프로파일을 설정
      TZ: Asia/Seoul
    volumes:
      - middle-proxy-volume:/mnt
    extra_hosts:
      - "313.co.kr:192.168.25.31"
      - "db.313.co.kr:192.168.25.40"
      - "nas.313.co.kr:192.168.25.42"
      - "ubuntu.313.co.kr:192.168.25.31"
      - "www.313.co.kr:192.168.25.31"
      - "www.a-rms.net:192.168.25.31"
      - "a-rms.net:192.168.25.31"
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: [node.hostname == swarm1]
    networks:
      - allinoneNetwork
    logging:
      driver: fluentd
      options:
        fluentd-address: 192.168.25.33:24224
        fluentd-async-connect: "true"
        fluentd-retry-wait: "1s"
        fluentd-max-retries: "30"
        tag: middleproxy

volumes:

######################################### Application #########################################

  middle-proxy-volume:
    driver: local
    driver_opts:
      type: "nfs"
      o: "addr=192.168.25.42,nolock,soft,rw,sync"
      device: ":/volume1/web/allinone/app/middle-proxy"

  backend-core-volume:
    driver: local
    driver_opts:
      type: "nfs"
      o: "addr=192.168.25.42,nolock,soft,rw,sync"
      device: ":/volume1/web/allinone/app/backend-core"

  engine-fire-volume:
    driver: local
    driver_opts:
      type: "nfs"
      o: "addr=192.168.25.42,nolock,soft,rw,sync"
      device: ":/volume1/web/allinone/app/engine-fire"

networks:
  allinoneNetwork:
    driver: overlay
    attachable: true
