Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- consul:
- image: consul
- ports:
- - ${CONSUL_PORT}:${CONSUL_PORT}
- command: ["agent", "-dev", "-ui", "-http-port","${CONSUL_PORT}", "-client", "0.0.0.0"]
- gateway:
- image: haproxy:1.9.4
- volumes:
- - ./haproxy:/haproxy-override
- - ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
- ports:
- - 8090:8090
- - 3333:3333
- depends_on:
- - coupon-service
- - category-service
- redis:
- image: redis:4-alpine
- ports:
- - ${REDIS_PORT}:6379
- networks:
- - cs_processing
- processing:
- environment:
- REDIS_TTL_RESERVED: 120
- CONSUL_HOST: ${CONSUL_HOST}
- CONSUL_PORT: ${CONSUL_PORT}
- LOGSTASH_HOST: logstash
- LOGSTASH_PORT: 5000
- TZ: "Europe/Moscow"
- build:
- context: ../processing
- command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/processing.jar"]
- depends_on:
- - consul
- ports:
- - 8080:8080
- - 8787:8787
- networks:
- - cs_processing
- coupon-service:
- environment:
- - CONSUL_HOST=${CONSUL_HOST}
- - CONSUL_PORT=${CONSUL_PORT}
- - database.host=${DB_HOST}
- - database.port=${DB_PORT}
- - database.username=${DB_USER}
- - database.password=${DB_PASSWORD}
- - database.name=${DB_NAME}
- - spring.kafka.bootstrap-servers=${KAFKA_HOST}:9092
- - LOGSTASH_HOST=logstash
- - LOGSTASH_PORT=5000
- image: artifactory.setmachine.ru:5000/coupon-processing/coupon-service:${DOCKER_TAG}
- command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/coupon-service.jar"]
- ports:
- - 8888:8080
- - 8788:8787
- depends_on:
- - consul
- - psql-master
- - kafka
- logging:
- options:
- max-size: "10m"
- max-file: "10"
- category-service:
- environment:
- - CONSUL_HOST=${CONSUL_HOST}
- - CONSUL_PORT=${CONSUL_PORT}
- - database.host=${DB_HOST}
- - database.port=${DB_PORT}
- - database.username=${DB_USER}
- - database.password=${DB_PASSWORD}
- - database.name=${DB_NAME}
- - spring.kafka.bootstrap-servers=${KAFKA_HOST}:9092
- - app.files.dir=/data/storage
- - FTP_HOST=ftp-server
- - FTP_PORT=21
- - LOGSTASH_HOST=logstash
- - LOGSTASH_PORT=5000
- image: artifactory.setmachine.ru:5000/coupon-processing/category-service:${DOCKER_TAG}
- command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/category-service.jar"]
- ports:
- - 8898:8080
- - 8798:8787
- depends_on:
- - consul
- - psql-master
- - kafka
- volumes:
- - /data/storage:/data/storage
- consumer-service:
- environment:
- - CONSUL_HOST=${CONSUL_HOST}
- - CONSUL_PORT=${CONSUL_PORT}
- - database.host=${DB_HOST}
- - database.port=${DB_PORT}
- - database.username=${DB_USER}
- - database.password=${DB_PASSWORD}
- - database.name=${DB_NAME}
- - app.tasks.coupons.kafka.bootstrap-servers=${KAFKA_HOST}:9092
- - app.tasks.series.kafka.bootstrap-servers=${KAFKA_HOST}:9092
- - app.tasks.imports.kafka.bootstrap-servers=${KAFKA_HOST}:9092
- - spring.datasource.hikari.maximum-pool-size=20
- - app.files.dir=/data/storage
- - FTP_HOST=ftp-server
- - FTP_PORT=21
- - LOGSTASH_HOST=logstash
- - LOGSTASH_PORT=5000
- image: artifactory.setmachine.ru:5000/coupon-processing/consumer-service:1.3.2
- command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/consumer-service.jar"]
- ports:
- - 8900:8080
- - 8911:8787
- depends_on:
- - consul
- - psql-master
- - kafka
- volumes:
- - /data/storage:/data/storage
- psql-master:
- image: postgres:11-alpine
- command: '-c max_connections=500'
- environment:
- - POSTGRES_USER=${DB_USER}
- - POSTGRES_PASSWORD=${DB_PASSWORD}
- - POSTGRES_DB=${DB_NAME}
- - PGDATA=/var/lib/postgresql/data
- ports:
- - 5532:5432
- logging:
- options:
- max-size: "10m"
- max-file: "10"
- volumes:
- - /media/me/myfiles/data/processing-psql/data:/var/lib/postgresql/data
- - ./scripts/db-init.sql:/docker-entrypoint-initdb.d/init.sql
- ftp-server:
- environment:
- - USERS=$FTP_USERS
- - ADDRESS=ftp-server
- image: delfer/alpine-ftp-server
- ports:
- - "10021:21"
- - "21000-21010:21000-21010"
- volumes:
- - /media/me/myfiles/data/ftp:/ftp
- dbapi:
- container_name: dbapi-service
- image: artifactory.setmachine.ru:5000/dbapi/dbapi-service:1.0.0
- command: ["java", "-Dspring.profiles.active=${SPRING_PROFILES}", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787", "-jar", "/app/dbapi-service.jar"]
- environment:
- - dbapi.databases.segments.url=jdbc:postgresql://pg-database:5432/${DB_NAME}
- - dbapi.databases.segments.username=segment_service
- - dbapi.databases.segments.password=Venn1834
- - dbapi.databases.segments.driver-class-name=org.postgresql.Driver
- - dbapi.databases.segments.pool-type-name=com.zaxxer.hikari.HikariDataSource
- - dbapi.databases.segments.pool-size=50
- - dbapi.databases.segments.pool-name="DbSegmentsPool"
- - dbapi.databases.segments.scheduled-stored-procedure-settings.duration=15s
- ports:
- - 38787:8787
- expose:
- - 8080
- depends_on:
- - pg-database
- logging:
- options:
- max-size: "10m"
- max-file: "10"
- elasticsearch:
- build:
- context: elk/elasticsearch/
- args:
- ELK_VERSION: $ELK_VERSION
- volumes:
- - ./elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
- ports:
- - "9200:9200"
- - "9300:9300"
- environment:
- ES_JAVA_OPTS: "-Xmx256m -Xms256m"
- logstash:
- build:
- context: elk/logstash/
- args:
- ELK_VERSION: $ELK_VERSION
- volumes:
- - ./elk/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
- - ./elk/logstash/pipeline:/usr/share/logstash/pipeline:ro
- ports:
- - "5000:5000"
- - "9600:9600"
- environment:
- LS_JAVA_OPTS: "-Xmx256m -Xms256m"
- depends_on:
- - elasticsearch
- kibana:
- build:
- context: elk/kibana/
- args:
- ELK_VERSION: $ELK_VERSION
- volumes:
- - ./elk/kibana/config/:/usr/share/kibana/config:ro
- ports:
- - "5601:5601"
- depends_on:
- - elasticsearch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement