Advertisement
fedorm

Untitled

Jun 7th, 2019
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.71 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.       - LOGSTASH_HOST=logstash
  32.       - LOGSTASH_PORT=5000
  33.     image: artifactory.setmachine.ru:5000/coupon-processing/coupon-service:${COUPON_TAG}
  34.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/coupon-service.jar"]
  35.     ports:
  36.       - 8888:8080
  37.       - 8788:8787
  38.     depends_on:
  39.       - consul
  40.       - psql-master
  41.     logging:
  42.       options:
  43.         max-size: "10m"
  44.         max-file: "10"
  45.  
  46.   category-service:
  47.     environment:
  48.       - CONSUL_HOST=${CONSUL_HOST}
  49.       - CONSUL_PORT=${CONSUL_PORT}
  50.       - database.host=${DB_HOST}
  51.       - database.port=${DB_PORT}
  52.       - database.username=${DB_USER}
  53.       - database.password=${DB_PASSWORD}
  54.       - database.name=${DB_NAME}
  55.       - app.files.dir=/data/storage
  56.       - FTP_HOST=ftp-server
  57.       - FTP_PORT=21
  58.       - LOGSTASH_HOST=logstash
  59.       - LOGSTASH_PORT=5000
  60.     image: artifactory.setmachine.ru:5000/coupon-processing/category-service:${CATEGORY_TAG}
  61.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/category-service.jar"]
  62.     ports:
  63.       - 8898:8080
  64.       - 8798:8787
  65.     depends_on:
  66.       - consul
  67.       - psql-master
  68.     volumes:
  69.       - /data/storage:/data/storage
  70.  
  71.   psql-master:
  72.     image: postgres:11-alpine
  73.     command: '-c max_connections=500'
  74.     environment:
  75.       - POSTGRES_USER=${DB_USER}
  76.       - POSTGRES_PASSWORD=${DB_PASSWORD}
  77.       - POSTGRES_DB=${DB_NAME}
  78.       - PGDATA=/var/lib/postgresql/data
  79.     ports:
  80.       - 5532:5432
  81.     logging:
  82.       options:
  83.         max-size: "10m"
  84.         max-file: "10"
  85.     volumes:
  86.       - /media/me/myfiles/data/coupon-processing-psql-master/data1:/var/lib/postgresql/data
  87.  
  88.  
  89.   ftp-server:
  90.     environment:
  91.       - USERS=$FTP_USERS
  92.       - ADDRESS=ftp-server
  93.     image: delfer/alpine-ftp-server
  94.     ports:
  95.       - "10021:21"
  96.       - "21000-21010:21000-21010"
  97.     volumes:
  98.       - /media/me/myfiles/data/ftp:/ftp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement