Files
otus-kotlin-developer/deploy/docker-compose-fbos.yml
Александр Веденёв f0446dee20 module 3 lesson 1
2025-02-05 13:23:17 +07:00

80 lines
2.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Минимальная версия инфраструктуры на базе
# OpenSearch
# OpenSearch Dashboards
# Fluent Bit
version: '3'
services:
app:
image: nginx:latest
ports:
- "8080:80"
depends_on:
- fluent-bit
volumes:
- ./volumes/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./volumes/nginx/nginx.conf:/etc/nginx/nginx.conf
logging:
# используемый драйвер логгирования
driver: "fluentd"
options:
# куда посылать лог-сообщения, необходимо чтобы адрес
# совпадал с настройками плагина forward
fluentd-address: localhost:24224
# теги используются для маршрутизации лог-сообщений, тема
# маршрутизации будет рассмотрена ниже
tag: app.logs
fluent-bit:
container_name: fluent-bit
image: fluent/fluent-bit
ports:
# необходимо открыть порты, которые используются плагином forward
- "24224:24224"
- "24224:24224/udp"
- "2020:2020"
environment:
- opensearch_host=opensearch
- opensearch_user=admin
- opensearch_pass=admin
volumes:
- ./volumes/fluent-bit-etc/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
- ./volumes/fluent-bit-etc/parsers.conf:/fluent-bit/etc/parsers.conf
opensearch:
container_name: opensearch
image: opensearchproject/opensearch:latest
environment:
- discovery.type=single-node
- http.port=9200
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- '9200:9200'
- '9600:9600'
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data:/usr/share/opensearch/data
dashboards:
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- "5601"
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
depends_on:
- opensearch
volumes:
opensearch-data: