Advertisement
fedorm

Untitled

Jun 7th, 2019
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.76 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4.   consul:
  5.     image: consul
  6.     ports:
  7.       - ${CONSUL_PORT}:${CONSUL_PORT}
  8.     command: ["agent", "-dev", "-ui", "-http-port","${CONSUL_PORT}", "-client", "0.0.0.0"]
  9.  
  10.   gateway:
  11.     image: haproxy:1.9.4
  12.     volumes:
  13.       - ./haproxy:/haproxy-override
  14.       - ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
  15.     ports:
  16.       - 8090:8090
  17.       - 3333:3333
  18.     depends_on:
  19.       - coupon-service
  20.       - category-service
  21.  
  22.   coupon-service:
  23.     environment:
  24.       - CONSUL_HOST=${CONSUL_HOST}
  25.       - CONSUL_PORT=${CONSUL_PORT}
  26.       - database.host=${DB_HOST}
  27.       - database.port=${DB_PORT}
  28.       - database.username=${DB_USER}
  29.       - database.password=${DB_PASSWORD}
  30.       - database.name=${DB_NAME}
  31.       - KAFKA_HOST=127.0.0.1
  32.       - LOGSTASH_HOST=logstash
  33.       - LOGSTASH_PORT=5000
  34.     image: artifactory.setmachine.ru:5000/coupon-processing/coupon-service:${COUPON_TAG}
  35.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/coupon-service.jar"]
  36.     ports:
  37.       - 8888:8080
  38.       - 8788:8787
  39.     depends_on:
  40.       - consul
  41.       - psql-master
  42.     logging:
  43.       options:
  44.         max-size: "10m"
  45.         max-file: "10"
  46.  
  47.   category-service:
  48.     environment:
  49.       - CONSUL_HOST=${CONSUL_HOST}
  50.       - CONSUL_PORT=${CONSUL_PORT}
  51.       - database.host=${DB_HOST}
  52.       - database.port=${DB_PORT}
  53.       - database.username=${DB_USER}
  54.       - database.password=${DB_PASSWORD}
  55.       - database.name=${DB_NAME}
  56.       - KAFKA_HOST=127.0.0.1
  57.       - app.files.dir=/data/storage
  58.       - FTP_HOST=ftp-server
  59.       - FTP_PORT=21
  60.       - LOGSTASH_HOST=logstash
  61.       - LOGSTASH_PORT=5000
  62.     image: artifactory.setmachine.ru:5000/coupon-processing/category-service:${CATEGORY_TAG}
  63.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/category-service.jar"]
  64.     ports:
  65.       - 8898:8080
  66.       - 8798:8787
  67.     depends_on:
  68.       - consul
  69.       - psql-master
  70.     volumes:
  71.       - /data/storage:/data/storage
  72.  
  73.   psql-master:
  74.     image: postgres:11-alpine
  75.     command: '-c max_connections=500'
  76.     environment:
  77.       - POSTGRES_USER=${DB_USER}
  78.       - POSTGRES_PASSWORD=${DB_PASSWORD}
  79.       - POSTGRES_DB=${DB_NAME}
  80.       - PGDATA=/var/lib/postgresql/data
  81.     ports:
  82.       - 5532:5432
  83.     logging:
  84.       options:
  85.         max-size: "10m"
  86.         max-file: "10"
  87.     volumes:
  88.       - /media/me/myfiles/data/coupon-processing-psql-master/data1:/var/lib/postgresql/data
  89.  
  90.  
  91.   ftp-server:
  92.     environment:
  93.       - USERS=$FTP_USERS
  94.       - ADDRESS=ftp-server
  95.     image: delfer/alpine-ftp-server
  96.     ports:
  97.       - "10021:21"
  98.       - "21000-21010:21000-21010"
  99.     volumes:
  100.       - /media/me/myfiles/data/ftp:/ftp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement