Advertisement
fedorm

Untitled

Jun 10th, 2019
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.55 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.  
  23.   redis:
  24.     image: redis:4-alpine
  25.     ports:
  26.       - ${REDIS_PORT}:6379
  27.     networks:
  28.       - cs_processing
  29.        
  30.   processing:
  31.     environment:
  32.       REDIS_TTL_RESERVED: 120
  33.       CONSUL_HOST: ${CONSUL_HOST}
  34.       CONSUL_PORT: ${CONSUL_PORT}
  35.       LOGSTASH_HOST: logstash
  36.       LOGSTASH_PORT: 5000
  37.       TZ: "Europe/Moscow"
  38.     build:
  39.       context: ../processing
  40.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/processing.jar"]
  41.     depends_on:
  42.       - consul
  43.     ports:
  44.       - 8080:8080
  45.       - 8787:8787
  46.     networks:
  47.       - cs_processing
  48.  
  49.   coupon-service:
  50.     environment:
  51.       - CONSUL_HOST=${CONSUL_HOST}
  52.       - CONSUL_PORT=${CONSUL_PORT}
  53.       - database.host=${DB_HOST}
  54.       - database.port=${DB_PORT}
  55.       - database.username=${DB_USER}
  56.       - database.password=${DB_PASSWORD}
  57.       - database.name=${DB_NAME}
  58.       - spring.kafka.bootstrap-servers=${KAFKA_HOST}:9092
  59.       - LOGSTASH_HOST=logstash
  60.       - LOGSTASH_PORT=5000
  61.     image: artifactory.setmachine.ru:5000/coupon-processing/coupon-service:${DOCKER_TAG}
  62.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/coupon-service.jar"]
  63.     ports:
  64.       - 8888:8080
  65.       - 8788:8787
  66.     depends_on:
  67.       - consul
  68.       - psql-master
  69.       - kafka
  70.     logging:
  71.       options:
  72.         max-size: "10m"
  73.         max-file: "10"
  74.  
  75.   category-service:
  76.     environment:
  77.       - CONSUL_HOST=${CONSUL_HOST}
  78.       - CONSUL_PORT=${CONSUL_PORT}
  79.       - database.host=${DB_HOST}
  80.       - database.port=${DB_PORT}
  81.       - database.username=${DB_USER}
  82.       - database.password=${DB_PASSWORD}
  83.       - database.name=${DB_NAME}
  84.       - spring.kafka.bootstrap-servers=${KAFKA_HOST}:9092
  85.       - app.files.dir=/data/storage
  86.       - FTP_HOST=ftp-server
  87.       - FTP_PORT=21
  88.       - LOGSTASH_HOST=logstash
  89.       - LOGSTASH_PORT=5000
  90.     image: artifactory.setmachine.ru:5000/coupon-processing/category-service:${DOCKER_TAG}
  91.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/category-service.jar"]
  92.     ports:
  93.       - 8898:8080
  94.       - 8798:8787
  95.     depends_on:
  96.       - consul
  97.       - psql-master
  98.       - kafka
  99.     volumes:
  100.       - /data/storage:/data/storage
  101.  
  102.   consumer-service:
  103.     environment:
  104.       - CONSUL_HOST=${CONSUL_HOST}
  105.       - CONSUL_PORT=${CONSUL_PORT}
  106.       - database.host=${DB_HOST}
  107.       - database.port=${DB_PORT}
  108.       - database.username=${DB_USER}
  109.       - database.password=${DB_PASSWORD}
  110.       - database.name=${DB_NAME}
  111.       - app.tasks.coupons.kafka.bootstrap-servers=${KAFKA_HOST}:9092
  112.       - app.tasks.series.kafka.bootstrap-servers=${KAFKA_HOST}:9092
  113.       - app.tasks.imports.kafka.bootstrap-servers=${KAFKA_HOST}:9092
  114.       - spring.datasource.hikari.maximum-pool-size=20
  115.       - app.files.dir=/data/storage
  116.       - FTP_HOST=ftp-server
  117.       - FTP_PORT=21
  118.       - LOGSTASH_HOST=logstash
  119.       - LOGSTASH_PORT=5000
  120.     image: artifactory.setmachine.ru:5000/coupon-processing/consumer-service:1.3.2
  121.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/consumer-service.jar"]
  122.     ports:
  123.       - 8900:8080
  124.       - 8911:8787
  125.     depends_on:
  126.       - consul
  127.       - psql-master
  128.       - kafka
  129.     volumes:
  130.       - /data/storage:/data/storage
  131.  
  132.   psql-master:
  133.     image: postgres:11-alpine
  134.     command: '-c max_connections=500'
  135.     environment:
  136.       - POSTGRES_USER=${DB_USER}
  137.       - POSTGRES_PASSWORD=${DB_PASSWORD}
  138.       - POSTGRES_DB=${DB_NAME}
  139.       - PGDATA=/var/lib/postgresql/data
  140.     ports:
  141.       - 5532:5432
  142.     logging:
  143.       options:
  144.         max-size: "10m"
  145.         max-file: "10"
  146.     volumes:
  147.       - /media/me/myfiles/data/processing-psql/data:/var/lib/postgresql/data
  148.       - ./scripts/db-init.sql:/docker-entrypoint-initdb.d/init.sql
  149.  
  150.   ftp-server:
  151.     environment:
  152.       - USERS=$FTP_USERS
  153.       - ADDRESS=ftp-server
  154.     image: delfer/alpine-ftp-server
  155.     ports:
  156.       - "10021:21"
  157.       - "21000-21010:21000-21010"
  158.     volumes:
  159.       - /media/me/myfiles/data/ftp:/ftp
  160.  
  161.  
  162.   dbapi:
  163.     container_name: dbapi-service
  164.     image: artifactory.setmachine.ru:5000/dbapi/dbapi-service:1.0.0
  165.     command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/dbapi-service.jar"]
  166.     environment:
  167.       - dbapi.databases.segments.url=jdbc:postgresql://pg-database:5432/${DB_NAME}
  168.       - dbapi.databases.segments.username=segment_service
  169.       - dbapi.databases.segments.password=Venn1834
  170.       - dbapi.databases.segments.driver-class-name=org.postgresql.Driver
  171.       - dbapi.databases.segments.pool-type-name=com.zaxxer.hikari.HikariDataSource
  172.       - dbapi.databases.segments.pool-size=50
  173.       - dbapi.databases.segments.pool-name="DbSegmentsPool"
  174.       - dbapi.databases.segments.scheduled-stored-procedure-settings.duration=15s
  175.     ports:
  176.       - 38787:8787
  177.     expose:
  178.       - 8080
  179.     depends_on:
  180.       - pg-database
  181.     logging:
  182.       options:
  183.         max-size: "10m"
  184.         max-file: "10"
  185.  
  186.   elasticsearch:
  187.     build:
  188.       context: elk/elasticsearch/
  189.       args:
  190.         ELK_VERSION: $ELK_VERSION
  191.     volumes:
  192.       - ./elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
  193.     ports:
  194.       - "9200:9200"
  195.       - "9300:9300"
  196.     environment:
  197.       ES_JAVA_OPTS: "-Xmx256m -Xms256m"
  198.  
  199.   logstash:
  200.     build:
  201.       context: elk/logstash/
  202.       args:
  203.         ELK_VERSION: $ELK_VERSION
  204.     volumes:
  205.       - ./elk/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
  206.       - ./elk/logstash/pipeline:/usr/share/logstash/pipeline:ro
  207.     ports:
  208.       - "5000:5000"
  209.       - "9600:9600"
  210.     environment:
  211.       LS_JAVA_OPTS: "-Xmx256m -Xms256m"
  212.     depends_on:
  213.       - elasticsearch
  214.  
  215.  
  216.   kibana:
  217.     build:
  218.       context: elk/kibana/
  219.       args:
  220.         ELK_VERSION: $ELK_VERSION
  221.     volumes:
  222.       - ./elk/kibana/config/:/usr/share/kibana/config:ro
  223.     ports:
  224.       - "5601:5601"
  225.     depends_on:
  226.       - elasticsearch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement