130 lines
3.5 KiB
YAML
130 lines
3.5 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16.4-alpine
|
|
shm_size: 256mb
|
|
command: |
|
|
postgres
|
|
-c shared_preload_libraries=pg_stat_statements
|
|
-c pg_stat_statements.track=all
|
|
-c max_connections=200
|
|
-c shared_buffers=256MB
|
|
-c effective_cache_size=8GB
|
|
-c work_mem=16MB
|
|
-c maintenance_work_mem=128MB
|
|
-c min_wal_size=128MB
|
|
-c max_wal_size=2GB
|
|
-c checkpoint_completion_target=0.9
|
|
-c wal_buffers=16MB
|
|
-c default_statistics_target=100
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "psql -U postgres -d postgres -c 'SELECT 1' || exit 1"]
|
|
interval: 2s
|
|
timeout: 10s
|
|
retries: 5
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- postgres-volume:/var/lib/postgresql/data
|
|
- ./sql:/docker-entrypoint-initdb.d
|
|
environment:
|
|
- POSTGRES_DB=postgres
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
grafana:
|
|
image: grafana/grafana:11.1.4
|
|
shm_size: 256mb
|
|
ports:
|
|
- 3000:3000
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- grafana-volume:/var/lib/grafana
|
|
- ./deploy/grafana-ds.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
|
|
|
|
prometheus:
|
|
image: prom/prometheus:v2.54.0
|
|
shm_size: 256mb
|
|
user: root
|
|
ports:
|
|
- 9090:9090
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- prometheus-volume:/etc/prometheus
|
|
- ./deploy/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
# node_exporter:
|
|
# image: quay.io/prometheus/node-exporter:latest
|
|
# command:
|
|
# - '--path.rootfs=/host'
|
|
# ports:
|
|
# - 9100:9100
|
|
# extra_hosts:
|
|
# - "host.docker.internal:host-gateway"
|
|
# pid: host
|
|
# volumes:
|
|
# - '/:/host:ro,rslave'
|
|
|
|
otel-collector:
|
|
image: otel/opentelemetry-collector-contrib:0.108.0
|
|
volumes:
|
|
- ./deploy/otel-collector.yaml:/etc/otelcol-contrib/config.yaml
|
|
ports:
|
|
- 8888:8888 # Prometheus metrics exposed by the Collector
|
|
- 8889:8889 # Prometheus exporter metrics
|
|
- 13133:13133 # health_check extension
|
|
# - 4317:4317 # OTLP gRPC receiver
|
|
- 4318:4318 # OTLP http receiver
|
|
|
|
tempo-init:
|
|
image: &tempoImage grafana/tempo:r177-60780f7
|
|
user: root
|
|
entrypoint:
|
|
- "chown"
|
|
- "10001:10001"
|
|
- "/var/tempo"
|
|
volumes:
|
|
- tempo-volume:/var/tempo
|
|
|
|
tempo:
|
|
image: *tempoImage
|
|
command: [ "-config.file=/etc/tempo.yaml" ]
|
|
volumes:
|
|
- ./deploy/tempo.yaml:/etc/tempo.yaml
|
|
- tempo-volume:/var/tempo
|
|
depends_on:
|
|
- tempo-init
|
|
|
|
kafka:
|
|
image: apache/kafka:3.8.0
|
|
environment:
|
|
KAFKA_NODE_ID: 1
|
|
KAFKA_PROCESS_ROLES: broker,controller
|
|
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
|
|
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
|
|
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
|
|
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
|
|
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
|
|
KAFKA_NUM_PARTITIONS: 3
|
|
ports:
|
|
- 9092:9092
|
|
# - 9093:9093
|
|
|
|
# backend:
|
|
# build: .
|
|
# # dockerfile: ./dockerfile
|
|
# volumes:
|
|
# - ./:/app
|
|
# ports:
|
|
# - 8080:8080
|
|
|
|
volumes:
|
|
postgres-volume:
|
|
grafana-volume:
|
|
tempo-volume:
|
|
prometheus-volume: |