version: "3.4"

# !!!not relevant!!!

# services:
#   parr-espp-template-sync:
#     image: harbor.dvgd.rzd/parr/parr-espp-template-sync:${tag:-latest}
#     container_name: parr-espp-template-sync
#     restart: always
#     environment:
#       - ASPNETCORE_ENVIRONMENT=Production
#       - TZ=Europe/Moscow
#     #volumes:
#       #- /var/log/parr-espp-template-sync:/app/log
#       #- parr_storage_dev:/app/Data
#     deploy:
#       replicas: 2

#   rabbitmq:
#     image: rabbitmq:3.12.4-management
#     container_name: rabbitmq
#     hostname: parr-rabbitmq
#     environment:
#       - RABBITMQ_DEFAULT_USER=rmuser
#       - RABBITMQ_DEFAULT_PASS=rmpassword
#       - RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit log_levels [{connection,error},{default,error}] disk_free_limit 2147483648
#     volumes:
#       - parr_rabbit:/var/lib/rabbitmq
#     ports:
#       - 15672:15672
#       - 5672:5672
#     deploy:
#       replicas: 1


# volumes:
#   parr_storage_dev:
#     name: parr_storage_dev
#     driver: local
#     driver_opts:
#       type: cifs
#       o: "addr=dvgd-appfs-01,username=parruserdev,password=P@ssDevParr202MM"
#       device: //dvgd-appfs-01/parr_storage_dev
#   parr_rabbit:
#     name: parr_rabbit
#     driver_opts:
#       type: "nfs"
#       o: "addr=dvgd-appfs-01.dvgd.oao.rzd,soft,rw,nfsvers=4"
#       device: ":/nfs/dvgd-swarm-01/parr_rabbit/data"


  # # --- NGINX ---
  # nginx-2:
  #     image: nginx:latest
  #     ports:
  #       - '8089:80'
  #     deploy:
  #       replicas: 5
  #       update_config:
  #         parallelism: 2
  #         order: start-first
  #         failure_action: rollback
  #         delay: 5s
  #       rollback_config:
  #         parallelism: 0
  #         order: stop-first
  #       restart_policy:
  #         condition: any
  #         delay: 5s
  #         max_attempts: 3
  #         window: 120s
  #     healthcheck:
  #       test: ["CMD", "service", "nginx", "status"]
  #     networks:
  #       - nginx-2